Name | block cooks|smelts item into item |
Event Lines | <block> cooks|smelts <item> (into <item>) |
Triggers | when an item is smelted/cooked by a block. |
Generated Examples | after block smelts wolf_armor:
on block cooks item into stone_slab: |
Contexts | <context.location> returns the LocationTag of the block smelting/cooking.
<context.source_item> returns the ItemTag that is being smelted/cooked.
<context.result_item> returns the ItemTag that is the result of the smelting/cooking.
|
Determine | ItemTag to set the item that is the result of the smelting/cooking. |
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
Group | Block |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/block/BlockCooksSmeltsItemScriptEvent.java#L13 |
Name | block dispenses item |
Event Lines | <block> dispenses <item> |
Triggers | when a block dispenses an item. |
Generated Examples | after lime_banner dispenses purple_glazed_terracotta:
after gray_candle_cake dispenses diorite_stairs: |
Contexts | <context.location> returns the LocationTag of the dispenser.
<context.item> returns the ItemTag of the item being dispensed.
<context.velocity> returns a LocationTag vector of the velocity the item will be shot at.
|
Determine | LocationTag to set the velocity the item will be shot at.
ItemTag to set the item being shot. |
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
Group | Block |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/block/BlockDispensesScriptEvent.java#L14 |
Name | block tries to dispense item |
Event Lines | <block> tries to dispense <item> |
Triggers | before a block dispenses an item.
This event fires before the dispenser fully processes a drop, allowing access to the dispensing slot and cancellation of sound effects. |
Generated Examples | after dead_tube_coral tries to dispense item:
on block tries to dispense dark_oak_hanging_sign: |
Contexts | <context.location> returns the LocationTag of the dispenser.
<context.item> returns the ItemTag of the item about to be dispensed.
<context.slot> returns a ElementTag(Number) of the slot that will be dispensed from.
|
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
Group | Block |
Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/events/BlockPreDispenseScriptEvent.java#L14 |
Name | brewing stand fueled with item |
Event Lines | brewing stand fueled (with <item>) |
Triggers | when a brewing stand receives an item to use as fuel. |
Generated Examples | after brewing stand fueled with bamboo_slab:
after brewing stand fueled: |
Contexts | <context.location> returns the LocationTag of the brewing stand.
<context.item> returns the ItemTag being inserted as fuel.
<context.fuel_power> returns the fuel power level being added. Each unit of fuel can power one brewing operation.
<context.consuming> returns a boolean indicating whether the fuel item will be consumed.
|
Determine | "FUEL_POWER:<ElementTag(Number)>" to set the fuel power level to be added.
"CONSUMING" to indicate that the fuel item should be consumed. "NOT_CONSUMING" to indicate that the fuel item should not be consumed. |
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
Group | Block |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/block/BrewingStandFueledScriptEvent.java#L14 |
Name | crafter crafts item |
Event Lines | crafter crafts <item> |
Triggers | when a crafter block crafts an item. |
Generated Examples | on crafter crafts sniffer_spawn_egg:
after crafter crafts wet_sponge: |
Contexts | <context.location> returns the LocationTag of the crafter block.
<context.item> returns the ItemTag being crafted.
<context.recipe_id> returns the ID of the recipe formed.
|
Determine | "ITEM:<ItemTag>" to set the item being crafted. Determinations still consume ingredients. |
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
Group | Block |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/block/CrafterCraftsScriptEvent.java#L15 |
Name | furnace burns item |
Event Lines | furnace burns <item> |
Triggers | when a furnace burns an item used as fuel. |
Generated Examples | after furnace burns light_gray_concrete_powder:
on furnace burns crimson_planks: |
Contexts | <context.location> returns the LocationTag of the furnace.
<context.item> returns the ItemTag burnt.
|
Determine | DurationTag to set the burn time for this fuel. |
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
Group | Block |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/block/FurnaceBurnsItemScriptEvent.java#L15 |
Name | furnace starts smelting item |
Event Lines | furnace starts smelting <item> |
Triggers | when a furnace starts smelting an item. |
Example |
|
Example |
|
Contexts | <context.location> returns a LocationTag of the furnace's location.
<context.item> returns an ItemTag of the item being smelted.
<context.recipe_id> returns an ElementTag of the recipe ID being used.
<context.total_cook_time> returns a DurationTag of the total time it will take to smelt the item.
|
Determine | DurationTag to set the total cook time for the item being smelted. |
Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
Group | Block |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/block/FurnaceStartsSmeltingScriptEvent.java#L15 |
Name | block equips item |
Event Lines | block equips <item> |
Triggers | when armor is equipped to an entity by a dispenser. |
Example |
|
Example |
|
Has Player | when the equipped entity is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Has NPC | when the equipped entity is an NPC. |
Switches | on:<entity> to only process the event if the entity having the armor equipped matches the entity input. |
Contexts | <context.item> returns the ItemTag of the armor being dispensed.
<context.entity> returns the EntityTag of the entity having the armor equipped.
<context.location> returns the LocationTag of the dispenser.
|
Determine | "ITEM:<ItemTag>" to set the item being dispensed. |
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
Group | Block |
Warning(s) | Determined armor types must match or armor will be assigned incorrect slots (for example, if the original item was a helmet but the new item is boots, the boots will be assigned to the helmet slot and will not display properly). If you determine a non-armor item, it will be dispensed normally. |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/block/BlockEquipsItemScriptEvent.java#L16 |
Name | entity drops item |
Event Lines | <entity> drops <item> |
Triggers | when an entity drops an item. |
Generated Examples | after entity drops item:
after hanging drops blue_stained_glass_pane: |
Has Player | When the entity dropping an item is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Contexts | <context.item> returns the ItemTag.
<context.entity> returns a EntityTag of the item.
<context.dropped_by> returns the EntityTag that dropped the item.
<context.location> returns a LocationTag of the item's location.
|
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
Group | Entity |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityDropsItemScriptEvent.java#L18 |
Name | entity shoots bow |
Event Lines | entity shoots bow
<entity> shoots <item> |
Triggers | when an entity shoots something out of a bow. |
Generated Examples | after entity shoots bow:
on monster shoots item: after entity shoots cherry_leaves: |
Has Player | when the entity that shot the bow is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Has NPC | when the entity that shot the bow is an NPC. |
Contexts | <context.entity> returns the EntityTag that shot the bow.
<context.projectile> returns a EntityTag of the projectile.
<context.bow> returns the ItemTag of the bow used to shoot.
<context.force> returns the force of the shot.
<context.item> returns an ItemTag of the shot projectile, if any.
<context.hand> returns "HAND" or "OFF_HAND" for which hand the bow was in.
|
Determine | ListTag(EntityTag) to change the projectile(s) being shot. (Note that in certain cases, determining an arrow may not be valid).
"KEEP_ITEM" to keep the projectile item on shooting it. |
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
Group | Entity |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityShootsBowScriptEvent.java#L27 |
Name | inventory picks up item |
Event Lines | <inventory> picks up <item> |
Triggers | when a hopper or hopper minecart picks up an item. |
Generated Examples | after hopper picks up red_stained_glass:
on composter picks up lime_candle: |
Contexts | <context.inventory> returns the InventoryTag that picked up the item.
<context.item> returns the ItemTag.
<context.entity> returns a EntityTag of the item entity.
|
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
Group | Item |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/item/InventoryPicksUpItemScriptEvent.java#L14 |
Name | item despawns |
Event Lines | <item> despawns |
Triggers | when an item entity despawns. |
Generated Examples | after stripped_spruce_wood despawns:
after item despawns: |
Contexts | <context.item> returns the ItemTag of the entity.
<context.entity> returns the EntityTag.
<context.location> returns the location of the entity to be despawned.
|
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
Group | Item |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/item/ItemDespawnsScriptEvent.java#L14 |
Name | item enchanted |
Event Lines | <item> enchanted |
Triggers | when an item is enchanted. |
Generated Examples | on glass enchanted:
on item enchanted: |
Has Player | when the enchanter is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Switches | enchant:<name> to only process the event if any of the enchantments being added match the given name. |
Contexts | <context.entity> returns the EntityTag of the enchanter (if applicable)
<context.location> returns the LocationTag of the enchanting table.
<context.inventory> returns the InventoryTag of the enchanting table.
<context.item> returns the ItemTag to be enchanted.
<context.button> returns which button was pressed to initiate the enchanting.
<context.cost> returns the experience level cost of the enchantment.
<context.enchants> returns a MapTag of enchantment names to the level that will be applied.
|
Determine | ElementTag(Number) to set the experience level cost of the enchantment.
"RESULT:<ItemTag>" to change the item result (only affects metadata (like enchantments), not material/quantity/etc!). "ENCHANTS:<MapTag>" to change the resultant enchantments. |
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
Group | Item |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/item/ItemEnchantedScriptEvent.java#L22 |
Name | item merges |
Event Lines | <item> merges |
Triggers | when an item entity merges into another item entity. |
Generated Examples | after oak_slab merges:
on spruce_boat merges: |
Contexts | <context.item> returns the ItemTag of the entity.
<context.entity> returns the EntityTag.
<context.target> returns the EntityTag being merged into.
<context.location> returns the location of the entity to be spawned.
|
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
Group | Item |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/item/ItemMergesScriptEvent.java#L15 |
Name | item moves from inventory to inventory |
Event Lines | <item> moves from <inventory> (to <inventory>) |
Triggers | when an entity or block moves an item from one inventory to another. (Hopper-style movement, not player-induced movement). |
Generated Examples | on trapped_chest moves from inventory:
after item moves from blast_furnace: |
Contexts | <context.origin> returns the origin InventoryTag.
<context.destination> returns the destination InventoryTag.
<context.initiator> returns the InventoryTag that initiated the item's transfer.
<context.item> returns the ItemTag that was moved.
|
Determine | ItemTag to set a different item to be moved. |
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
Group | Item |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/item/ItemMoveScriptEvent.java#L13 |
Name | item recipe formed |
Event Lines | <item> recipe formed |
Triggers | when an item's recipe is correctly formed. |
Generated Examples | after beetroot_soup recipe formed:
after red_concrete recipe formed: |
Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Contexts | <context.inventory> returns the InventoryTag of the crafting inventory.
<context.item> returns the ItemTag to be formed in the result slot.
<context.recipe> returns a ListTag of ItemTags in the recipe.
<context.recipe_id> returns the ID of the recipe that was formed.
<context.is_repair> returns an ElementTag(Boolean) of whether the event was triggered by a tool repair operation rather than a crafting recipe.
|
Determine | ItemTag to change the item that is formed in the result slot. |
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Group | Item |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/item/ItemRecipeFormedScriptEvent.java#L23 |
Name | item spawns |
Event Lines | <item> spawns |
Triggers | when an item entity spawns. |
Generated Examples | after acacia_chest_boat spawns:
on suspicious_sand spawns: |
Contexts | <context.item> returns the ItemTag of the entity.
<context.entity> returns the EntityTag.
<context.location> returns the location of the entity to be spawned.
|
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
Group | Item |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/item/ItemSpawnsScriptEvent.java#L15 |
Name | block drops item from breaking |
Event Lines | block drops item from breaking
<block> drops <item> from breaking |
Triggers | when a items drop from a block due to a player breaking the block in survival mode. |
Generated Examples | after block drops item from breaking:
on block drops item from breaking: after purple_shulker_box drops rabbit_spawn_egg from breaking: |
Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Contexts | <context.location> returns the LocationTag the block was broken at.
<context.material> returns the MaterialTag of the block that was broken.
<context.drop_entities> returns a ListTag of EntityTags of type DROPPED_ITEM. To get the list of ItemTags, just tack ".parse[item]" onto this context tag.
|
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
Group | Player |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/BlockDropsItemScriptEvent.java#L19 |
Name | entity picks up item |
Event Lines | <entity> picks up <item>
<entity> takes <item> |
Triggers | when an entity picks up an item. |
Generated Examples | after npc picks up item:
after entity takes polar_bear_spawn_egg: after fish picks up elder_guardian_spawn_egg: after animal takes elytra: |
Has Player | when the entity picking up the item is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Has NPC | when the entity picking up the item is an npc. |
Contexts | <context.item> returns an ItemTag of the item being picked up.
<context.entity> returns an EntityTag of the item entity being picked up.
<context.pickup_entity> returns an EntityTag of the entity picking up the item.
<context.location> returns a LocationTag of the item's location.
|
Determine | "ITEM:<ItemTag>" to change the item being picked up. |
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
Group | Player |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityPicksUpItemScriptEvent.java#L20 |
Name | player breaks held item |
Event Lines | player breaks held item
player breaks held <item> |
Triggers | when a player breaks the item they are holding. |
Generated Examples | after player breaks held item:
after player breaks held crimson_fence: after player breaks held apple: |
Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Contexts | <context.item> returns the item that broke.
<context.slot> returns the slot of the item that broke.
|
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
Group | Player |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerBreaksItemScriptEvent.java#L21 |
Name | player changes armor stand item |
Event Lines | player changes armor stand item |
Triggers | when a player modifies an armor stand entity. |
Generated Examples | after player changes armor stand item:
on player changes armor stand item: |
Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Switches | from:<item> to only process the event if the item on the armor stand being interacted with matches the specified item matcher.
hand:<hand> to only process the event if the player is using a specific hand to interact with the armor stand. Available only on MC versions 1.19+. to:<item> to only process the event if the item held by the player matches the specified item matcher. slot:<slot> to only process the event if the armor stand's item slot that was interacted with is the specified slot. armor_stand:<entity> to only process the event if the armor stand being interacted with matches the specified entity matcher. |
Contexts | <context.armor_stand_item> returns the ItemTag being interacted with on the armor stand.
<context.entity> returns an EntityTag of the armor stand.
<context.hand> returns an ElementTag of the hand used by the player to interact with the armor stand, can be either HAND or OFF_HAND. Available only on MC versions 1.19+.
<context.player_item> returns the ItemTag held by the player.
<context.slot> returns an ElementTag of the armor stand's item slot that was interacted with. Valid equipment slot values can be found at https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/EquipmentSlot.html.
|
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
Group | Player |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerArmorStandManipulateScriptEvent.java#L18 |
Name | player click_type clicks item in inventory |
Event Lines | player (<click_type>) clicks (<item>) in <inventory> |
Triggers | when a player clicks in an inventory. Note that you likely will also want to listen to player drags in inventory. |
Generated Examples | after player click_type clicks in inventory:
on player clicks in enderchest: |
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 if a specified cursor item was used.
in_area:<area> replaces the default 'in:<area>' for this event. action:<action> to only process the event if a specified action occurred. slot:<slot> to only process the event if a specified slot or slot_type was clicked. For slot input options, see Slot Inputs. |
Contexts | <context.item> returns the ItemTag the player has clicked on.
<context.inventory> returns the InventoryTag (the 'top' inventory, regardless of which slot was clicked).
<context.clicked_inventory> returns the InventoryTag that was clicked in.
<context.cursor_item> returns the item the Player is clicking with.
<context.click> returns an ElementTag with the name of the click type. Click type list: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/ClickType.html
<context.slot_type> returns an ElementTag with the name of the slot type that was clicked. Slot type list: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/InventoryType.SlotType.html
<context.slot> returns an ElementTag with the number of the slot that was clicked.
<context.raw_slot> returns an ElementTag with the raw number of the slot that was clicked.
<context.is_shift_click> returns true if 'shift' was used while clicking.
<context.action> returns the inventory_action. See Inventory Actions.
<context.hotbar_button> returns an ElementTag of the button pressed as a number, or 0 if no number button was pressed.
|
Determine | ItemTag to set the current item for the event. |
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
Group | Player |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerClicksInInventoryScriptEvent.java#L70 |
Name | player consumes item |
Event Lines | player consumes item
player consumes <item> |
Triggers | when a player consumes (eats/drinks) an item (like food or potions). |
Generated Examples | on player consumes item:
after player consumes item: |
Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Contexts | <context.item> returns the ItemTag.
<context.hand> returns an ElementTag of the hand being used to consume the item. Can be either HAND or OFF_HAND. Requires a 1.19+ server.
|
Determine | ItemTag to change the item being consumed. Use with caution, if the player is eating a stack of items, this will replace the entire stack. |
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
Group | Player |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerConsumesScriptEvent.java#L21 |
Name | player crafts item |
Event Lines | player crafts item
player crafts <item> |
Triggers | when a player fully crafts an item. |
Generated Examples | after player crafts item: |
Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Contexts | <context.inventory> returns the InventoryTag of the crafting inventory.
<context.item> returns the ItemTag to be crafted.
<context.amount> returns the amount of the item that will be crafted (usually 1, except when shift clicked. Can be above 64).
<context.recipe> returns a ListTag of ItemTags in the recipe.
<context.recipe_id> returns the ID of the recipe that is being crafted.
<context.click_type> returns an ElementTag with the name of the click type. Click type list: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/ClickType.html
|
Determine | ItemTag to change the item that is crafted. |
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Group | Player |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerCraftsItemScriptEvent.java#L25 |
Name | player drags in inventory |
Event Lines | player drags in inventory
player drags (<item>) (in <inventory>) |
Triggers | when a player drags in an inventory (that is, clicks and then holds the mouse button down while moving the mouse across multiple slots). |
Generated Examples | after player drags in inventory:
on player drags item in furnace: on player drags glass_bottle: |
Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Switches | in_area:<area> replaces the default 'in:<area>' for this event.
drag_type:<type> to only run the event if the given drag type (SINGLE or EVEN) was used. |
Contexts | <context.item> returns the ItemTag the player has dragged.
<context.inventory> returns the InventoryTag (the 'top' inventory, regardless of which slot was clicked).
<context.clicked_inventory> returns the InventoryTag that was clicked in.
<context.slots> returns a ListTag of the slot numbers dragged through.
<context.raw_slots> returns a ListTag of the raw slot numbers dragged through.
<context.drag_type> returns either SINGLE or EVEN depending on whether the player used their left or right mouse button.
|
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
Group | Player |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerDragsInInvScriptEvent.java#L25 |
Name | player empties bucket |
Event Lines | player empties bucket
player empties <item> |
Triggers | when a player empties a bucket. |
Generated Examples | on player empties bucket:
after player empties item: after player empties grindstone: |
Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Contexts | <context.item> returns the ItemTag of the bucket being emptied (just material, other properties are lost - use 'player.item_in_hand' if you need full data).
<context.location> returns the LocationTag of the block clicked with the bucket.
<context.relative> returns the LocationTag of the block in front of the clicked block.
|
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
Group | Player |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerEmptiesBucketScriptEvent.java#L17 |
Name | player fills bucket |
Event Lines | player fills bucket
player fills <item> |
Triggers | when a player fills a bucket. |
Generated Examples | after player fills bucket:
after player fills blackstone_stairs: on player fills bucket: after player fills diorite_wall: |
Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Contexts | <context.item> returns the ItemTag of the filled bucket.
<context.location> returns the LocationTag of the block clicked with the bucket.
<context.material> returns the MaterialTag of the LocationTag.
|
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
Group | Player |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerFillsBucketScriptEvent.java#L17 |
Name | player fishes entity while state |
Event Lines | player fishes (<entity>) (while <state>)
player fishes (<item>) (while <state>) |
Triggers | when a player uses a fishing rod. |
Generated Examples | after player fishes entity while state:
on player fishes: after player fishes living while state: after player fishes item: |
Has Player | If the fisher or the caught entity is a player (in most cases, the fisher can be assumed to be a real player). - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Has NPC | If the fisher or the caught entity is an NPC. |
Switches | with:<item> to only process the event if the fishing rod is a specified item. |
Contexts | <context.hook> returns an EntityTag of the hook.
<context.state> returns an ElementTag of the fishing state. Valid states: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerFishEvent.State.html
<context.entity> returns an EntityTag of the entity that got caught.
<context.item> returns an ItemTag of the item gotten, if any.
<context.xp> returns the amount of experience that will drop.
|
Determine | "CAUGHT:<ItemTag>" to change the item that was caught (only if an item was already being caught).
"XP:<ElementTag(Number)>" to change how much experience will 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>', ... |
Group | Player |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerFishesScriptEvent.java#L21 |
Name | player item takes damage |
Event Lines | player item takes damage
player <item> takes damage |
Triggers | when the player damages an item. |
Generated Examples | after player item takes damage:
on player item takes damage: on player exposed_chiseled_copper takes damage: |
Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Contexts | <context.damage> returns the amount of damage the item has taken.
<context.original_damage> returns the original amount of damage the item would have taken, before any modifications such as the unbreaking enchantment (only on Paper).
<context.item> returns the item that has taken damage.
<context.slot> returns the slot of the item that has taken damage. This value is a bit of a hack and is not reliable.
|
Determine | ElementTag(Number) to set the amount of damage the item will take. |
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) | item durability changes |
Group | Player |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerItemTakesDamageScriptEvent.java#L20 |
Name | player mends item |
Event Lines | player mends item
player mends <item> |
Triggers | when an XP orb is used to repair an item with the Mending enchantment in the player's inventory. |
Generated Examples | on player mends item:
on player mends brown_glazed_terracotta: after player mends item: after player mends warped_sign: |
Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Contexts | <context.item> returns the item that is repaired.
<context.repair_amount> returns how much durability the item recovers.
<context.xp_orb> returns the XP orb that triggered the event.
<context.slot> returns the slot of the item that has been repaired. This value is a bit of a hack and is not reliable.
|
Determine | ElementTag(Number) to set the amount of durability the item recovers. |
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
Group | Player |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerMendsItemScriptEvent.java#L18 |
Name | player places block |
Event Lines | player places block
player places <item> |
Triggers | when a player places a block. |
Example |
|
Example |
|
Example |
|
Example |
|
Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Switches | using:<hand_type> to only process the event if the player is using the specified hand type (HAND or OFF_HAND).
against:<location> to only process the event if block that this new block is being placed against matches the specified LocationTag matcher. type:<material> to only process the event if the block placed matches the MaterialTag matcher input. |
Contexts | <context.location> returns the LocationTag of the block that was placed.
<context.material> returns the MaterialTag of the block that was placed.
<context.old_material> returns the MaterialTag of the block that was replaced.
<context.item_in_hand> returns the ItemTag of the item in hand.
<context.hand> returns the name of the hand that the block was in (HAND or OFF_HAND).
<context.against> returns the LocationTag of the block this block was placed against.
|
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
Group | Player |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerPlacesBlockScriptEvent.java#L18 |
Name | player prepares item enchant |
Event Lines | player prepares item enchant
player prepares <item> enchant |
Triggers | when a player prepares to enchant an item. |
Generated Examples | on player prepares item enchant:
on player prepares panda_spawn_egg enchant: after player prepares item enchant: |
Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Contexts | <context.location> returns the LocationTag of the enchanting block.
<context.item> returns the ItemTag to be enchanted.
<context.bonus> returns an ElementTag(Number) of the enchanting bonus available (number of bookshelves).
<context.offers> returns a ListTag of the available enchanting offers, each as a MapTag with keys 'cost', 'enchantment_type', and 'level'.
|
Determine | "OFFERS:<ListTag>" of MapTags to set the offers available. Cannot be a different size list than the size of context.offers. |
Group | Player |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerPreparesEnchantScriptEvent.java#L20 |
Name | player scrolls their hotbar |
Event Lines | player scrolls their hotbar
player holds item |
Triggers | when a player scrolls through their hotbar. |
Generated Examples | after player scrolls their hotbar:
after player holds item: |
Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Switches | item:<item> to only process the event when the player is going to hold a specified item. |
Contexts | <context.new_slot> returns the number of the new inventory slot.
<context.previous_slot> returns the number of the old inventory slot.
|
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
Group | Player |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/HotbarScrollScriptEvent.java#L15 |
Name | player smiths item |
Event Lines | player smiths item
player smiths <item> |
Triggers | when a player upgrades an item on a smithing table. |
Generated Examples | after player smiths item:
on player smiths spruce_leaves: |
Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Contexts | <context.inventory> returns the InventoryTag of the smithing table inventory.
<context.item> returns the ItemTag after upgrading.
|
Determine | ItemTag to change the item that results from the upgrade. |
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Group | Player |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerSmithsItemScriptEvent.java#L19 |
Name | player swaps items |
Event Lines | player swaps items |
Triggers | when a player swaps the items in their main and off hands. |
Generated Examples | after player swaps items:
on player swaps items: |
Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Switches | main:<item> to only process the event if the item being put into the main hand matches the input item.
offhand:<item> to only process the event if the item being put into the off-hand matches the input item. |
Contexts | <context.main> returns the ItemTag switched to the main hand.
<context.offhand> returns the ItemTag switched to the off hand.
|
Determine | "MAIN:<ItemTag>" to set the item in the main hand.
"OFFHAND:<ItemTag>" to set the item in the off hand. |
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Group | Player |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerSwapsItemsScriptEvent.java#L17 |
Name | player takes item from furnace |
Event Lines | player takes item from furnace
player takes <item> from furnace |
Triggers | when a player takes an item from a furnace. |
Generated Examples | on player takes item from furnace:
after player takes rabbit from furnace: after player takes item from furnace: |
Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Contexts | <context.location> returns the LocationTag of the furnace.
<context.item> returns the ItemTag taken out of the furnace.
|
Determine | ElementTag(Number) to set the amount of experience the player will get. |
Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
Group | Player |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerTakesFromFurnaceScriptEvent.java#L17 |
Name | player takes item from lectern |
Event Lines | player takes item from lectern
player takes <item> from lectern |
Triggers | when a player takes a book from a lectern. |
Generated Examples | after player takes item from lectern:
on player takes waxed_weathered_chiseled_copper from lectern: on player takes item from lectern: |
Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Contexts | <context.location> returns the LocationTag of the lectern.
<context.item> returns the book ItemTag taken out of the lectern.
|
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
Group | Player |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerTakesFromLecternScriptEvent.java#L17 |
Name | player prepares anvil craft item |
Event Lines | player prepares anvil craft item
player prepares anvil craft <item> |
Triggers | when a player prepares an anvil to craft an item. |
Generated Examples | after player prepares anvil craft item:
on player prepares anvil craft hoglin_spawn_egg: |
Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Contexts | <context.inventory> returns the InventoryTag of the anvil inventory.
<context.item> returns the ItemTag to be crafted.
<context.repair_cost> returns an ElementTag(Number) of the repair cost.
<context.new_name> returns an ElementTag of the new name.
|
Determine | ElementTag(Number) to set the repair cost.
ItemTag to change the item that is crafted. |
Group | Player |
Warning(s) | The player doing the crafting is estimated and may be inaccurate. |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerPreparesAnvilCraftScriptEvent.java#L19 |
Name | player prepares smithing item |
Event Lines | player prepares smithing item
player prepares smithing <item> |
Triggers | when a player prepares to upgrade an item on a smithing table. |
Generated Examples | on player prepares smithing item:
on player prepares smithing red_glazed_terracotta: after player prepares smithing item: after player prepares smithing glistering_melon_slice: |
Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Contexts | <context.inventory> returns the InventoryTag of the smithing table inventory.
<context.item> returns the ItemTag after upgrading.
|
Determine | ItemTag to change the item that results from the upgrade. |
Group | Player |
Warning(s) | The player doing the smithing is estimated and may be inaccurate. |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayersPrepareSmithingTableScriptEvent.java#L18 |
Name | player raises|lowers|toggles item |
Event Lines | player raises|lowers|toggles <item> |
Triggers | when a player starts or stops holding up an item, such as a shield, spyglass, or crossbow. |
Generated Examples | after player raises archer_pottery_sherd:
after player raises light_blue_dye: |
Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Switches | reason:<reason> to only process the event if the reason matches the input. |
Contexts | <context.state> returns an ElementTag(Boolean) of whether the player raised or lowered the item.
<context.held_for> returns a DurationTag of how long the player held the item up for (only on Paper).
<context.hand> returns an ElementTag of the hand that the player is raising or lowering (only on Paper).
<context.item> returns an ItemTag of the item that the player is raising or lowering (only on Paper).
<context.reason> returns the reason for a state change. Can be: raise, lower, swap, hold, drop, quit, death.
|
Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
Synonyms (Search Aid) | player raises shield, player raises spyglass |
Group | Player |
Warning(s) | For 'lowers', the item may be tracked incorrectly. Prefer 'player lowers item' (the generic item form) for a 'lowers' event (similar for 'toggles').
Also be aware this event may misfire in some cases. This event and its data are more accurate on Paper servers. |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerRaiseLowerItemScriptEvent.java#L28 |
Name | player prepares grindstone craft item |
Event Lines | player prepares grindstone craft <item> |
Triggers | when a player prepares to grind an item. |
Example |
|
Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Contexts | <context.inventory> returns the InventoryTag of the grindstone inventory.
<context.result> returns the ItemTag to be crafted.
|
Determine | "RESULT:<ItemTag>" to change the item that is crafted. |
Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
Group | Player |
Requires | Paper |
Warning(s) | The player doing the grinding is estimated and may be inaccurate. |
Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/events/PlayerPreparesGrindstoneCraftScriptEvent.java#L18 |
Name | lingering potion splash|splashes |
Event Lines | lingering potion splash|splashes
lingering <item> splash|splashes |
Triggers | when a lingering splash potion breaks open |
Generated Examples | on lingering potion splashes:
on lingering waxed_copper_trapdoor splash: after lingering potion splashes: on lingering item splash: |
Contexts | <context.potion> returns an ItemTag of the potion that broke open.
<context.location> returns the LocationTag the splash potion broke open at.
<context.entity> returns an EntityTag of the splash potion.
<context.cloud> returns the EntityTag of the area of effect cloud.
<context.radius> returns the radius of the effect cloud.
<context.duration> returns the lingering duration of the effect cloud.
|
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
Group | World |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/world/LingeringPotionSplashScriptEvent.java#L16 |
Name | potion splash|splashes |
Event Lines | potion splash|splashes
<item> splash|splashes |
Triggers | when a splash potion breaks open. |
Example |
|
Contexts | <context.potion> returns an ItemTag of the potion that broke open.
<context.entities> returns a ListTag of affected entities.
<context.location> returns the LocationTag the splash potion broke open at.
<context.entity> returns an EntityTag of the splash potion.
<context.intensity> returns an ListTag(MapTag) of the intensity for all affected entities.
|
Determine | INTENSITY:<ListTag(MapTag)>" to set the intensity of specified entities. |
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
Group | World |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/world/PotionSplashScriptEvent.java#L25 |
Name | player changes framed item |
Event Lines | player changes framed <item> |
Triggers | when a player interacts with an item frame by adding, removing, or rotating the item held in it. |
Generated Examples | after player changes framed chain:
after player changes framed item: |
Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Switches | frame:<entity> to only process the event if the item frame entity being matches the input.
action:<action> to only process the event if the change matches the input. |
Contexts | <context.frame> returns the EntityTag of the item frame.
<context.item> returns the ItemTag of the item held in the item frame.
<context.action> returns the ElementTag of the action being performed, based on https://jd.papermc.io/paper/1.20/io/papermc/paper/event/player/PlayerItemFrameChangeEvent.ItemFrameChangeAction.html
|
Determine | "ITEM:<ItemTag>" to change the item held by the item frame. If there is an item already in the frame, it will be replaced. To remove the item, set it to air. |
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
Group | Paper |
Requires | Paper |
Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/events/PlayerChangesFramedItemScriptEvent.java#L16 |
Name | player equips|unequips armor|helmet|chestplate|leggings|boots |
Event Lines | player equips|unequips armor|helmet|chestplate|leggings|boots
player equips|unequips <item> |
Triggers | when a player (un)equips armor. |
Generated Examples | on player equips leggings:
after player unequips light_gray_banner: after player equips leggings: on player unequips petrified_oak_slab: |
Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Contexts | <context.new_item> returns the ItemTag that is now in the slot.
<context.old_item> returns the ItemTag that used to be in the slot.
<context.slot> returns the name of the slot.
|
Group | Paper |
Requires | Paper |
Warning(s) | This event is not reliable, and may miss some types of equipment changes or fire when equipment hasn't actually changed. |
Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/events/PlayerEquipsArmorScriptEvent.java#L22 |