AbstractChatEvent
The abstract base class for player chat events.
An abstract implementation of a chat event, handling shared logic.
The abstract base class for player chat events.
An abstract implementation of a chat event, handling shared logic.
Base class for player respawn events.
Called when an anvil is damaged from being used.
Called when an anvil is damaged from being used
Called when a player takes the result item out of an anvil.
Called when a player takes the result item out of an anvil
Fired when an anvil slot changes and causes its result slot to update.
Called when anvil slots change, triggering the result slot to be updated
Called when a lingering potion applies its effects. Happens once every 5 ticks.
Called when a lingering potion applies it's effects. Happens once every 5 ticks
Fired before an entity's arrow count is updated, allowing the update to be modified or cancelled.
Called when an arrow enters or exists an entity's body.
Called when the server decorates a chat component via commands.
Experimental phase.
This event is fired when the server decorates a component for chat purposes.
This event is fired when the server decorates a component for chat purposes. This is called before AsyncChatEvent and the other chat events. It is recommended that you modify the message here, and use the chat events for modifying receivers and later the chat type. If you want to keep the message as "signed" for the clients who get it, be sure to include the entire original message somewhere in the final message. See AsyncChatCommandDecorateEvent for the decoration of messages sent via commands
Experimental phase.
Fired when a player sends a chat message to the server. It may run synchronously or asynchronously depending on the trigger; check isAsynchronous().
An event fired when a Player sends a chat message to the server. This event will sometimes fire synchronously, depending on how it was triggered. If a player is the direct cause of this event by an incoming packet, this event will be asynchronous. If a plugin triggers this event by compelling a player to chat, this event will be synchronous. Care should be taken to check Event.isAsynchronous() and treat the event appropriately.
Base class for events that depend on asynchronous operations completing.
Represents an event which depends on the result of asynchronous operations.
Fired when a player chats. Incoming player packets trigger it asynchronously, while plugin-triggered chat runs synchronously; check isAsynchronous().
This event will sometimes fire synchronously, depending on how it was triggered. The constructor provides a boolean to indicate if the event was fired synchronously or asynchronously. When asynchronous, this event can be called from any thread, sans the main thread, and has limited access to the API. If a player is the direct cause of this event by an incoming packet, this event will be asynchronous. If a plugin triggers this event by compelling a player to chat, this event will be synchronous. Care should be taken to check Event.isAsynchronous() and treat the event appropriately.
Formerly used to format chat previews; chat previews have been removed.
Used to format chat for chat preview. If this event is used, then the result of the corresponding AsyncPlayerChatEvent must be formatted in the same way.
Experimental phase.
Called after a player connection has been configured and before the player enters the world. This event allows for the configuration of the player connection, so that player connection configuration code can run asynchronously.
An event that allows you to configure the player. This is async and allows you to run configuration code on the player. Once this event has finished execution, the player connection will continue. This occurs after configuration, but before the player has entered the world.
Fired asynchronously, off the main thread, when a player attempts to log in.
Stores details for players attempting to log in. This event is asynchronous, and not run using main thread.
Fired when a player's Brigadier command tree is generated for the client. It can fire twice, asynchronously and synchronously; check isAsynchronous() and hasFiredAsync().
Fired any time a Brigadier RootCommandNode is generated for a player to inform the client of commands. You may manipulate this CommandNode to change what the client sees. This event may fire on login, world change, and permission rebuilds, by plugin request, and potentially future means. This event will fire before PlayerCommandSendEvent, so no filtering has been done by other plugins yet. WARNING: This event will potentially (and most likely) fire twice! Once for Async, and once again for Sync. It is important that you check event.isAsynchronous() and event.hasFiredAsync() to ensure you only act once. If for some reason we are unable to send this asynchronously in the future, only the sync method will fire. Your logic should look like this: if (event.isAsynchronous() || !event.hasFiredAsync()) { // do stuff } If your logic is not safe to run asynchronously, only react to the synchronous version. This is a draft/experimental API and is subject to change.
Experimental phase.
Called when sending suggestions to the client.
Called when sending Suggestions to the client. Will be called asynchronously if a plugin marks the AsyncTabCompleteEvent event handled asynchronously, otherwise called synchronously. If the suggestions are empty after this event has been called, nothing will be sent to the client.
Fired to select the spawn location when a player joins or reconfigures. The player stays in configuration until handlers finish and the spawn location loads.
Called when selecting a player's spawn location (i.e. joining the server or reconfiguring). The player will be kept in the configuration phase until all event handlers return and the spawn location is loaded.
Fired during chunk loading when the data fixer removes a block entity whose type no longer exists in the current version. Despite the Async prefix, it can run on a loading worker or the main thread; avoid heavy or blocking work.
This event is emitted by the server when the data fixer is removing a block entity associated with a block due to the block entity type no longer existing in this minecraft version. Notable examples include the removal of the bed block entity in 26.2. WARNING: While this event is prefixed with 'Async' it is executed as part of the chunk loading process. It may hence either execute on the chunk loading worker threads or the servers main thread, if a chunk load is executed there. In either case, heavy or blocking work is strongly discouraged to ensure the server runs smoothly. This is also applicable for the chunk loading worker threads, which the server main thread might be blocking on. Schedule large amount of work into separate thread pools.
Allows transformers to modify blocks and entities placed by a structure. Natural placement runs asynchronously; placement via /place structure runs synchronously.
This event will sometimes fire synchronously, depending on how it was triggered. The constructor provides a boolean to indicate if the event was fired synchronously or asynchronously. When asynchronous, this event can be called from any thread, sans the main thread, and has limited access to the API. If a Structure is naturally placed in a chunk of the world, this event will be asynchronous. If a player executes the '/place structure' command, this event will be synchronous. Allows to register transformers that can modify the blocks placed and entities spawned by the structure. Care should be taken to check Event.isAsynchronous() and treat the event appropriately.
Experimental phase.
Called when a structure is naturally generated in the world.
Called when a Structure is naturally generated in the world.
Allows plugins to compute tab completion results asynchronously.
Allows plugins to compute tab completion results asynchronously. If this event provides completions, then the standard synchronous process will not be fired to populate the results. However, the synchronous TabCompleteEvent will fire with the Async results. Only 1 process will be allowed to provide completions, the Async Event, or the standard process.
Called when a bat attempts to sleep or wake up from its slumber.
Called when a bat attempts to sleep or wake up from its slumber. If a Bat Toggle Sleep event is cancelled, the Bat will not toggle its sleep state.
Called when a beacon’s beam becomes visible.
Called when a beacon is activated. Activation occurs when the beacon beam becomes visible.
Called when a beacon is deactivated.
Called when a beacon is deactivated, either because its base block(s) or itself were destroyed.
Called when a beacon effect is being applied to a player.
Called when a beacon effect is being applied to a player.
Called when a bee targets a flower.
Called when a bee targets a flower
Called when a bee starts pollinating.
Called when a bee starts pollinating
Called when a bee stops pollinating.
Called when a bee stops pollinating
Fired when a ringing bell resonates and highlights nearby raiders. Resonance occurs only when raiders are nearby.
Called when a bell resonated after being rung and highlights nearby raiders. A bell will only resonate if raiders are in the vicinity of the bell.
Fired when a bell is about to reveal a raider's location.
Called when a Raider is revealed by a bell.
Use the BellResonateEvent added to Bukkit
Called when a bell is rung.
Called when a bell is rung.
Use the BellRingEvent added to Bukkit.
Called when a bell is being rung.
Called when a bell is being rung.
Called when a block forces another block to break and drop items.
Called when a block forces another block to break and drop items. Currently called for piston's and liquid flows.
Called when a block is broken by a player.
Called when a block is broken by a player. If you wish to have the block drop experience, you must set the experience value above 0. By default, experience will be set in the event if: The player is not in creative or adventure mode The player can loot the block (ie: does not destroy it completely, by using the correct tool) The player does not have silk touch The block drops experience in vanilla Minecraft Note: Plugins wanting to simulate a traditional block drop should set the block to air and utilize their own methods for determining what the default drop for the block being broken is and what to do about it, if anything. If a Block Break event is cancelled, the block will not break and experience will not drop.
Called when the progress of a block break is updated.
Called when the progress of a block break is updated.
Called when a block is brushed by a player.
Called when a block is brushed by a player.
Experimental phase.
Called when a block is destroyed as a result of being burnt by fire.
Called when a block is destroyed as a result of being burnt by fire. If a Block Burn event is cancelled, the block will not be destroyed as a result of being burnt by fire.
Fired to check whether a block can be placed at the attempted location.
Called when we try to place a block, to see if we can build it here or not. Note: The Block returned by getBlock() is the block we are trying to place on, not the block we are trying to place. If you want to figure out what is being placed, use getMaterial() instead.
Called when an ItemStack is successfully cooked in a block.
Called when an ItemStack is successfully cooked in a block.
Called when a player stops damaging a Block.
Called when a player stops damaging a Block.
Fired when a player damages a block. Cancelling prevents that damage.
Called when a block is damaged by a player. If a Block Damage event is cancelled, the block will not be damaged.
Fired when an explicit trigger, such as a physics update or piston, makes the server intend to destroy a block. It does not cover every change to air.
Fired anytime the server intends to 'destroy' a block through some triggering reason. This does not fire anytime a block is set to air, but only with more direct triggers such as physics updates, pistons, entities changing blocks, commands set to "Destroy". This event is associated with the game playing a sound effect at the block in question, when something can be described as "intend to destroy what is there", Events such as leaves decaying, pistons retracting (where the block is moving), does NOT fire this event.
Fired when a block dispenses an equippable item onto a nearby entity. Cancelling prevents the equipment from being applied.
Called when an equippable item is dispensed from a block and equipped on a nearby entity. If a Block Dispense Armor event is cancelled, the equipment will not be equipped on the target entity.
Fired when a block dispenses an item. Cancelling prevents the item from being dispensed.
Called when an item is dispensed from a block. If a Block Dispense event is cancelled, the block will not dispense the item.
Fired when a block such as a vault dispenses loot from its loot table. This is distinct from dispensing one inventory item through BlockDispenseEvent.
Called when a block dispenses loot from its designated LootTable. This is not to be confused with events like BlockDispenseEvent which fires when a singular item is dispensed from its inventory container. Example: A player unlocks a trial chamber vault and the vault block dispenses its loot.
Experimental phase.
Called if a block broken by a player drops an item. If the block break is cancelled, this event won't be called.
Called if a block broken by a player drops an item. If the block break is cancelled, this event won't be called. If isDropItems in BlockBreakEvent is set to false, this event won't be called. This event will also be called if the player breaks a multi block structure, for example a torch on top of a stone. Both items will have an event call. The Block is already broken as this event is called, so #getBlock() will be AIR in most cases. Use #getBlockState() for more Information about the broken block.
Represents a block related event.
Represents a block related event.
An event that's called when a block yields experience.
An event that's called when a block yields experience.
Fired when a block explodes. Use getExplodedBlockState() to inspect the block state before the explosion.
Called when a block explodes. Note that due to the nature of explosions, BlockEvent.getBlock() will always be an air block. getExplodedBlockState() should be used to get information about the block state that exploded.