Commit Graph

82 Commits

Author SHA1 Message Date
masmc05 c44f891d99 Fix PlayerUseUnknownEntityEvent jd (#11969) 2025-01-14 12:11:20 +01:00
Hannes Greule 287eb52fa4 Use hidden classes for event executors (#11848)
Static final MethodHandles perform similar to direct calls. Additionally,
hidden classes simplify logic around ClassLoaders as they can be defined
weakly coupled to their defining class loader. All variants of methods
(static, private, non-void) can be covered by this mechanism.
2024-12-29 00:11:09 +01:00
Jake Potrebic ca8709b30f Fix more incorrect array nullability annotations (#11836) 2024-12-27 22:24:16 +01:00
Jake Potrebic 083c083188 Fix a bunch more issues arising from mutable types (#11769) 2024-12-22 22:50:00 +01:00
Mark Vainomaa f14d6e62da Add an API for CanPlaceOn and CanDestroy NBT values 2018-09-12 18:53:35 +03:00
Owen1212055 69edd6d91f Brigadier based command API
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2022-08-01 22:50:29 -04:00
Warrior 8636a7d5a4 Add /paper dumplisteners command 2022-11-19 19:46:44 +01:00
Jake Potrebic 957d209cb4 Add PlayerSetSpawnEvent 2021-05-19 18:58:24 -07:00
William Blake Galbreath 48046af5ef Add PrepareResultEvent / PrepareGrindstoneEvent
Adds a new event for all crafting stations that generate a result slot item

Anvil, Grindstone and Smithing now extend this event

Grindstone is a backwards compat from a previous PrepareGrindstoneEvent
2020-07-03 11:58:56 -05:00
LordKorea 20c3b04159 Add and implement PlayerRecipeBookClickEvent 2020-05-11 22:38:10 -04:00
Mariell Hoversholm 3dc7ae31ea Add villager reputation API 2020-04-22 23:13:49 +02:00
MiniDigger | Martin ef291e36d1 Add Mob Goal API 2020-01-03 16:24:46 +01:00
nossr50 83b1a9e372 Add PlayerAttackEntityCooldownResetEvent 2020-03-26 19:30:58 -07:00
MiniDigger | Martin 6143a7a97b Add Player Client Options API 2020-01-20 21:38:34 +01:00
BillyGalbreath fbcf4759fb Entity Jump API 2020-02-08 23:26:18 -06:00
William Blake Galbreath 599bf3512d Add ThrownEggHatchEvent
Adds a new event similar to PlayerEggThrowEvent, but without the Player requirement
(dispensers can throw eggs to hatch them, too).
2020-02-09 00:19:08 -06:00
simpleauthority d2e1163917 Add BlockSoundGroup interface
This PR adds the getSoundGroup() method in Block which returns a BlockSoundGroup
2019-05-28 03:41:28 -07:00
Aikar 06e00bdd20 Server Tick Events
Fires event at start and end of a server tick
2019-03-27 21:58:55 -04:00
MisterVector 452f8cf88b Add PlayerPostRespawnEvent 2018-10-26 21:33:13 -07:00
Mark Vainomaa 86603709de Add GS4 Query event 2019-03-17 21:46:27 +02:00
Mark Vainomaa 13d4e540cf Add WhitelistToggleEvent 2019-03-13 20:04:43 +02:00
Aikar 719f0a0a7e BlockDestroyEvent
Adds an event for when the server is going to destroy a current block,
potentially causing it to drop. This event can be cancelled to avoid
the block destruction, such as preventing signs from popping when
floating in the air.

This can replace many uses of BlockPhysicsEvent
2019-02-06 00:19:33 -05:00
Spottedleaf 1302332a7e Add PlayerConnectionCloseEvent
This event is invoked when a player has disconnected. It is guaranteed that,
if the server is in online-mode, that the provided uuid and username have been
validated.

The event is invoked for players who have not yet logged into the world, whereas
PlayerQuitEvent is only invoked on players who have logged into the world.

The event is invoked for players who have already logged into the world,
although whether or not the player exists in the world at the time of
firing is undefined. (That is, whether the plugin can retrieve a Player object
using the event parameters is undefined). However, it is guaranteed that this
event is invoked AFTER PlayerQuitEvent, if the player has already logged into
the world.

This event is guaranteed to never fire unless AsyncPlayerPreLoginEvent has
been called beforehand, and this event may not be called in parallel with
AsyncPlayerPreLoginEvent for the same connection.

Cancelling the AsyncPlayerPreLoginEvent guarantees the corresponding
PlayerConnectionCloseEvent is never called.

The event may be invoked asynchronously or synchronously. As it stands,
it is never invoked asynchronously. However, plugins should check
Event#isAsynchronous to be future-proof.

On purpose, the deprecated PlayerPreLoginEvent event is left out of the
API spec for this event. Plugins should not be using that event, and
how PlayerPreLoginEvent interacts with PlayerConnectionCloseEvent
is undefined.
2018-10-07 12:05:06 -07:00
Caleb Bassham fb826f7221 Add spectator target events
- PlayerStartSpectatingEntityEvent
- PlayerStopSpectatingEntityEvent
2018-09-28 02:30:56 -05:00
BillyGalbreath 342e189485 Turtle API 2018-09-28 17:08:09 -05:00
BillyGalbreath 51b4b8a059 Add LivingEntity#getTargetEntity 2018-09-22 00:32:53 -05:00
Phoenix616 63821bf96b PreSpawnerSpawnEvent
This adds a separate event before an entity is spawned by a spawner
which contains the location of the spawner too similarly to how the
SpawnerSpawnEvent gets called instead of the CreatureSpawnEvent for
spawners.

Dropped as it does not apply due to the earlier PreCreatureSpawnEvent patch not being applied
2018-09-18 23:50:10 +01:00
Aikar 6512e0749b Add Material Tags
This adds a bunch of useful and missing Tags to be able to identify items that
are related to each other by a trait.

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: Lena Kolb <lenakolb2204@gmail.com>
Co-authored-by: Layla Silbernberg <livsilbernberg@gmail.com>
Co-authored-by: Newwind <newwindserver@gmail.com>
2018-07-17 01:27:15 -04:00
Aikar 2983b658fc Mob Pathfinding API
Adds an API to allow plugins to instruct a Mob to Pathfind to a Location or Entity

This does not do anything to stop other AI rules from changing the location, so
it is still up to the plugin to control that or override after another goal changed
the location.

You can use EntityPathfindEvent to cancel new pathfinds from overriding your current.
2018-09-09 12:39:06 -04:00
BillyGalbreath c708d136f7 Add ray tracing methods to LivingEntity 2018-09-03 18:13:53 -05:00
BillyGalbreath 2c612508cb Add More Creeper API 2018-08-24 11:50:16 -05:00
BillyGalbreath 72098bd870 Add PhantomPreSpawnEvent 2018-08-25 19:56:42 -05:00
BillyGalbreath b589db2d90 Slime Pathfinder Events 2018-08-24 08:18:27 -05:00
Mark Vainomaa 0961228e4c Add TNTPrimeEvent 2018-07-15 22:17:55 +03:00
BillyGalbreath cc6614603e AnvilDamageEvent 2018-07-20 23:36:55 -05:00
BillyGalbreath 431acee6c7 SkeletonHorse Additions 2018-07-27 22:36:17 -05:00
BillyGalbreath d50ba0d9d0 PlayerLaunchProjectileEvent 2018-07-21 03:10:50 -05:00
BillyGalbreath c3ab659a8a PlayerElytraBoostEvent 2018-07-21 01:59:53 -05:00
BillyGalbreath d8cc2cf7e6 EnderDragon Events 2018-07-21 01:51:05 -05:00
Aikar c8a0abe8fd RangedEntity API
Allows you to determine if an entity is capable of ranged attacks,
and to perform an attack.
2018-06-26 21:34:40 -04:00
Brokkonaut e95376162f Add entity knockback events
- EntityKnockbackEvent
- EntityPushedByEntityAttackEvent
- EntityKnockbackByEntityEvent

Co-authored-by: aerulion <aerulion@gmail.com>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2018-06-18 15:40:39 +02:00
Aikar 2533372193 PlayerReadyArrowEvent
Called when a player is firing a bow and the server is choosing an arrow to use.
Plugins can skip selection of certain arrows and control which is used.
2018-06-18 01:09:27 -04:00
Shane Freeder 5cc8f5a0e6 Add EntityTeleportEndGatewayEvent 2018-06-09 13:08:21 +01:00
Aikar a4ea7eef0b WitchReadyPotionEvent
Control what potion the witch readies to use
2018-06-05 22:47:08 -04:00
Aikar 9970e9dfde WitchThrowPotionEvent
Fired when a witch throws a potion at a player
2018-05-16 20:39:09 -04:00
Aikar 045c3d85fe WitchConsumePotionEvent
Fires when a witch consumes the potion in their hand
2018-05-16 20:26:16 -04:00
Aikar 4be5a9c1a7 EndermanAttackPlayerEvent
Allow control over whether or not an enderman aggros a player.

This allows you to override/extend the pumpkin/stare logic.
2018-05-01 20:17:44 -04:00
Aikar 2a57740d34 Expand World.spawnParticle API and add Builder
Adds ability to control who receives it and who is the source/sender (vanish API)
the standard API is to send the packet to everyone in the world, which is ineffecient.

This adds a new Builder API which is much friendlier to use.
2017-08-29 23:58:48 -04:00
Aikar 1281d5b384 EndermanEscapeEvent
Fires an event anytime an enderman intends to teleport away from the player

You may cancel this, enabling ranged attacks to damage the enderman for example.
2018-04-30 13:14:30 -04:00
Minecrell 16b17bdc68 Add legacy ping support to PaperServerListPingEvent
Add a new method to StatusClient check if the client is a legacy
client that does not support all of the features provided in the
event.
2017-10-11 19:30:20 +02:00