| Name | player breaks block |
| Event Lines | player breaks block
player breaks <material> |
| Triggers | when a player breaks a block. |
| Generated Examples | after player breaks block:
on player breaks dark_oak_trapdoor: on player breaks material: |
| Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Switches | with:<item> to only process the event when the player is breaking the block with a specified item. |
| Contexts | <context.location> returns the LocationTag the block was broken at.
<context.material> returns the MaterialTag of the block that was broken.
<context.xp> returns how much XP will be dropped.
<context.should_drop_items> returns whether the event will drop items.
|
| Determine | "NOTHING" to make the block drop no items.
ListTag(ItemTag) to make the block drop a specified list of items. ElementTag(Number) to set the amount of xp to drop. |
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Synonyms (Search Aid) | player mines block, player mines ore, player digs block |
| Group | Player |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerBreaksBlockScriptEvent.java#L21 |