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 2 out of 396 events...

Categories:

Player | Paper



Category: Player


Nameplayer steps on block
Event Lines player steps on block
player steps on <material>
Triggerswhen a player steps onto a specific block material.
Generated Examplesafter player steps on block:
on player steps on suspicious_sand:
after player steps on exposed_copper_grate:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Contexts<context.location> returns a LocationTag of the block the player is stepping on.
<context.previous_location> returns a LocationTag of where the player was before stepping onto the block.
<context.new_location> returns a LocationTag of where the player is now.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupPlayer
Warning(s)This event may fire very rapidly.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerStepsOnScriptEvent.java#L17



Category: Paper


Nameentity steps on block
Event Lines entity steps on block
<entity> steps on <material>
Triggerswhen a non-player entity steps onto a specific block material. For players, use Event:player steps on block.
Example
# Announce the name of the entity stepping on the block and the material of block.
on entity steps on block:
- announce "<context.entity.name> stepped on a <context.location.material.name>!"
Example
# Announce the material of the block a sheep has stepped on.
on sheep steps on block:
- announce "A sheep has stepped on a <context.location.material.name>!"
Example
# Announce that a sheep has stepped on a diamond block.
on sheep steps on diamond_block:
- announce "A sheep has stepped on a diamond block! Must be a wealthy sheep!"
Contexts<context.entity> returns an EntityTag of the entity stepping onto the block.
<context.location> returns a LocationTag of the block the entity is stepping on.
<context.previous_location> returns a LocationTag of where the entity was before stepping onto the block.
<context.new_location> returns a LocationTag of where the entity is now.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupPaper
RequiresPaper
Warning(s)This event may fire very rapidly.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/events/EntityStepsOnScriptEvent.java#L15