Name | player right|left clicks fake entity |
Event Lines | player (right|left) clicks fake entity |
Triggers | when a player clicks a fake entity, one that is only shown to the player and not tracked by the server. |
Generated Examples | after player clicks fake entity:
on player clicks fake entity: |
Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Contexts | <context.entity> returns the EntityTag of the entity that was clicked. Note that this entity is not being tracked by the server, so many operations may not be possible on it.
This will return null if the player clicks a fake entity that was not spawned via fakespawn.
<context.hand> returns an ElementTag of the hand used to click.
<context.click_type> returns an ElementTag of the click type (left/right).
|
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/PlayerClicksFakeEntityScriptEvent.java#L16 |
Name | player right|left clicks block |
Event Lines | player (right|left) clicks <block> |
Triggers | when a player clicks on a block or in the air. |
Generated Examples | on player left clicks waxed_cut_copper_stairs:
after player right clicks jungle_sign: |
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 item was held.
using:hand/off_hand/either_hand to only process the event if the specified hand was used to click. type:<material> to only run if the block clicked matches the material input. |
Contexts | <context.item> returns the ItemTag the player is clicking with.
<context.location> returns the LocationTag the player is clicking on.
<context.relative> returns a LocationTag of the air block in front of the clicked block.
<context.click_type> returns an ElementTag of the Spigot API click type https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/Action.html.
<context.hand> returns an ElementTag of the used hand.
|
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 |
Warning(s) | this event may in some cases double-fire, requiring usage of the 'ratelimit' command (like 'ratelimit <player> 1t') to prevent doubling actions.
this sometimes fires at unexpected times, eg when dropping an item. |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerClicksBlockScriptEvent.java#L22 |
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 right clicks entity |
Event Lines | player right clicks <entity> |
Triggers | when a player right clicks on an entity. |
Generated Examples | on player right clicks item_display:
after player right clicks pufferfish: |
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 holding a specified item.
type:<entity> to only run if the entity clicked matches the entity input. |
Contexts | <context.entity> returns the EntityTag the player is clicking on.
<context.item> returns the ItemTag the player is clicking with.
<context.hand> returns "offhand" or "mainhand" to indicate which hand was used to fire the event. Some events fire twice - once for each hand.
<context.click_position> returns a LocationTag of the click position (as a world-less vector, relative to the entity's center). This is only available when clicking armor stands.
|
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 |
Warning(s) | this event may in some cases double-fire, requiring usage of the 'ratelimit' command (like 'ratelimit <player> 1t') to prevent doubling actions. |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerRightClicksEntityScriptEvent.java#L21 |