Denizen Script Events


Events are a way to listen to things that happened on your server and respond to them through a script. These usually pair with 'world' script containers.
Learn about how events work in The Beginner's Guide.


Showing 1 out of 378 events...
Nameplayer click_type clicks item in inventory
Event Lines player (<click_type>) clicks (<item>) in <inventory>
Triggerswhen a player clicks in an inventory. Note that you likely will also want to listen to Event:player drags in inventory.
Generated Examplesafter player clicks heavy_weighted_pressure_plate in inventory:
on player click_type clicks in inventory:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Switcheswith:<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 Language: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 Language:Inventory Actions.
<context.hotbar_button> returns an ElementTag of the button pressed as a number, or 0 if no number button was pressed.
DetermineItemTag to set the current item for the event.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupPlayer
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerClicksInInventoryScriptEvent.java#L70