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 399 events...
Nameplayer tracks|untracks entity
Event Lines player tracks|untracks <entity>
Triggerswhen a player starts or stops tracking an entity. An entity is tracked/untracked by a player's client when the player moves in/out of its Mechanism:EntityTag.tracking_range.
Example
# Narrate when the player tracks any entities except for item frames.
on player tracks !item_frame:
- narrate "You are now tracking <context.entity.name> at <context.entity.location.simple>"
Example
on player untracks chicken:
- narrate "CHICKEN: No! Come back! :("
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Contexts<context.entity> returns an EntityTag of the entity being tracked or untracked.
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/PlayerTracksEntityScriptEvent.java#L16