Need help? Ask on the forum, ask a fellow user or developer (join us on IRC), or contact sk89q.
Contribute to the wiki, edit this page! Register an account, or login with Facebook first.
HEY! Do you integrate (or want to) a plugin into yours? Do you help work on WE/WG/etc.? Please subscribe to our mailing list!
CommandHelper
Event API
Events allow you to trigger scripts not just on commands, but also on other actions, such as a player logging in, or a player breaking a block. See the documentation on events for more information
| Event Name | Description | Prefilters | Event Data | Mutable Fields | Since |
|---|---|---|---|---|---|
| player_chat | Fired when any player attempts to send a chat message. | player: Macro | message: The message to be sent recipients: An array of players that will recieve the chat message. If a player doesn't exist or is offline, and is in the array, it is simply ignored, no exceptions will be thrown. |
message recipients |
3.3.0 |
| player_death | Fired when a player dies. | player: Macro | player: The player that died drops: An array of the dropped items xp: The xp that will be dropped cause: The cause of death death_message: The death message |
xp drops: : An array of item objects, or null. The items to be dropped are replaced with the given items, not added to death_message: : the death message, or null to remove it entirely |
3.3.0 |
| player_interact | Fires when a player left or right clicks a block or the air | block: Item Match If the block the player interacts with is this button: String Match left or right. If they left or right clicked item: Item Match The item they are holding when they interacted player: String Match The player that triggered the event |
action: One of either: left_click_block, right_click_block, left_click_air, or right_click_air block: The id of the block they clicked, or 0 if they clicked the air. If they clicked the air, neither facing or location will be present. player: The player associated with this event facing: The (lowercase) face of the block they clicked. See <<jd:[bukkit]org.bukkit.block.BlockFace>> for the possible values location: The (x, y, z, world) location of the block they clicked |
' | 3.3.0 |
| player_join | This event is called when a player logs in. Setting join_message to null causes it to not be displayed at all. Cancelling the event does not prevent them from logging in. Instead, you should just kick() them. | player: String Match join_message: Regex |
player: The player's name join_message: The default join message |
join_message | 3.3.0 |
| player_spawn | Fires when a player respawns | x: Expression y: Expression z: Expression world: String Match player: Macro |
player: The player that is respawning location: The location they are going to respawn at |
location | 3.3.0 |
Errors in documentation
Please note that this documentation is generated automatically, if you notice an error in the documentation, please file a bug report for the plugin itself! For information on undocumented functions, see this page
| |||||||||||||||||||||||