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 396 events...
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