| 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 | on player toggles hopper:
after player raises yellow_bed: |
| 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 |