| Name | block shears entity |
| Event Lines | <block> shears <entity> |
| Triggers | when a dispenser shears a nearby sheep. |
| Generated Examples | on block shears animal:
after block shears vehicle: |
| Contexts | <context.location> returns the LocationTag of the dispenser.
<context.tool> returns the ItemTag of the item used to shear the entity.
<context.entity> returns the EntityTag of the sheared entity.
|
| 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 | Block |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/block/BlockShearEntityScriptEvent.java#L14 |
| Name | ender_dragon changes phase |
| Event Lines | ender_dragon changes phase
<entity> changes phase |
| Triggers | when a dragon's combat phase changes. |
| Generated Examples | after ender_dragon changes phase:
on player changes phase: on living changes phase: |
| Switches | from:<phase> to only process the event if the dragon was previously in the specified phase.
to:<phase> to only process the event if the dragon is changing to the specified phase. |
| Contexts | <context.entity> returns the EntityTag of the dragon.
<context.new_phase> returns an ElementTag of the dragon's new phase. Phases: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EnderDragon.Phase.html
<context.old_phase> returns an ElementTag of the dragon's old phase. Can be any phase or 'null' in some cases.
|
| Determine | ElementTag to change the dragon's new phase. |
| 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 | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/DragonPhaseChangeScriptEvent.java#L14 |
| Name | entity breaks hanging because cause |
| Event Lines | <entity> breaks <hanging> (because <cause>) |
| Triggers | when a hanging entity (painting, item_frame, or leash_hitch) is broken. |
| Generated Examples | on animal breaks hanging because cause:
on illusioner breaks hanging because cause: |
| Has Player | when the breaker is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Has NPC | when the breaker is an npc. |
| Contexts | <context.cause> returns the cause of the entity breaking. Causes list: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/hanging/HangingBreakEvent.RemoveCause.html
<context.breaker> returns the EntityTag that broke the hanging entity, if any.
<context.hanging> returns the EntityTag of the hanging.
|
| 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 | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityBreaksHangingScriptEvent.java#L19 |
| Name | entity breeds |
| Event Lines | <entity> breeds |
| Triggers | when two entities breed. |
| Generated Examples | after living breeds:
on entity breeds: |
| Contexts | <context.breeder> returns the EntityTag responsible for breeding, if it exists.
<context.child> returns the child EntityTag.
<context.mother> returns the parent EntityTag creating the child. The child will spawn at the mother's location.
<context.father> returns the other parent EntityTag.
<context.item> returns the ItemTag used to initiate breeding, if it exists.
<context.experience> returns the amount of experience granted by breeding.
|
| Determine | ElementTag(Number) to set the amount of experience granted by breeding. |
| 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 | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityBreedScriptEvent.java#L15 |
| Name | entity casts spell |
| Event Lines | <entity> casts <spell> |
| Triggers | when an entity, usually an Evoker or Illusioner, casts a spell. |
| Generated Examples | on panda casts spell:
after arrow casts spell: |
| Contexts | <context.entity> returns the EntityTag of the Spellcaster entity.
<context.spell> returns an ElementTag of the spell used. Valid spells can be found at https://jd.papermc.io/paper/1.20/org/bukkit/entity/Spellcaster.Spell.html
|
| 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 | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntitySpellCastScriptEvent.java#L13 |
| Name | entity changes air level |
| Event Lines | <entity> changes air level |
| Triggers | when an entity's air level changes. |
| Generated Examples | after entity changes air level:
after player changes air level: |
| Has Player | when the entity that's air level has changed is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Has NPC | when the entity that's air level has changed is an NPC. |
| Contexts | <context.entity> returns the EntityTag.
<context.air_duration> returns a DurationTag of the entity's new air level.
|
| Determine | DurationTag to set the entity's new air level. |
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Synonyms (Search Aid) | player loses oxygen, player drowns, player is drowning, oxygen depletion |
| Group | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityAirLevelChangeScriptEvent.java#L17 |
| Name | entity changes block into block |
| Event Lines | <entity> changes <block> (into <block>) |
| Triggers | when an entity changes the material of a block. |
| Generated Examples | after oak_boat changes green_candle_cake into block:
after entity changes cyan_glazed_terracotta: |
| Has Player | when the entity that changed the block is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Contexts | <context.entity> returns the EntityTag that changed the block.
<context.location> returns the LocationTag of the changed block.
<context.old_material> returns the old material of the block.
<context.new_material> returns the new material of the block.
|
| 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 | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityChangesBlockScriptEvent.java#L17 |
| Name | entity changes food level |
| Event Lines | <entity> changes food level |
| Triggers | when an entity's food level changes. |
| Generated Examples | on entity changes food level:
on mob changes food level: |
| Has Player | when the entity that's food level has changed is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Has NPC | when the entity that's food level has changed is an NPC. |
| Switches | item:<item> to only process the event if it was triggered by an item that matches the specified item. |
| Contexts | <context.entity> returns the EntityTag.
<context.food> returns an ElementTag(Number) of the entity's new food level.
<context.item> returns an ItemTag of the item that triggered the event, if any.
|
| Determine | ElementTag(Number) to set the entity's new food level. |
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Synonyms (Search Aid) | player hunger depletes |
| Group | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityFoodLevelChangeScriptEvent.java#L16 |
| Name | entity changes pose |
| Event Lines | <entity> changes pose |
| Triggers | when an entity changes its visual pose. |
| Generated Examples | on living changes pose:
after entity changes pose: |
| Has Player | when the entity that changed its pose is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Switches | old:<pose> to only process the event if the old pose matches the input.
new:<pose> to only process the event if the new pose matches the input. |
| Contexts | <context.entity> returns the EntityTag that changed its pose.
<context.old_pose> returns the name of the old pose. See https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/entity/Pose.html
<context.new_pose> returns the name of the new pose.
|
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityChangesPoseScriptEvent.java#L16 |
| Name | entity combusts |
| Event Lines | <entity> combusts |
| Triggers | when an entity catches fire. |
| Generated Examples | on item_display combusts:
on entity combusts: |
| Has Player | when the entity that catches fire is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Has NPC | when the entity that catches fire is an NPC. |
| Contexts | <context.entity> returns the entity that caught fire.
<context.duration> returns the length of the burn.
<context.source> returns the EntityTag or LocationTag that caused the fire, if any. NOTE: Currently, if the source is a LocationTag, the tag will return a null. It is expected that this will be fixed by Spigot in the future.
<context.source_type> returns the type of the source, which can be: ENTITY, LOCATION, NONE.
|
| Determine | DurationTag set the burn duration. |
| 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 | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityCombustsScriptEvent.java#L20 |
| Name | entity creates portal |
| Event Lines | <entity> creates portal |
| Triggers | when an entity creates a portal. Generally, prefer portal created instead of this. |
| Generated Examples | after entity creates portal:
on projectile creates portal: |
| Has Player | if the entity that created the portal is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Contexts | <context.entity> returns the EntityTag that created the portal.
<context.portal_type> returns the type of portal: CUSTOM, ENDER, or NETHER.
<context.blocks> returns a list of block locations where the portal is being created.
|
| 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 | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityCreatePortalScriptEvent.java#L17 |
| Name | entity damaged by entity |
| Event Lines | <entity> damaged by <entity>
<entity> damaged (by <cause>)
<entity> damages <entity> |
| Triggers | when an entity is damaged. |
| Example | |
| Example | |
| Example | |
| Example | |
| Has Player | when the damager or damaged entity is a player. Cannot be both. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Has NPC | when the damager or damaged entity is an NPC. Cannot be both. |
| Switches | with:<item> to only process the event when the item used to cause damage (in the damager's hand) is a specified item.
type:<entity> to only run if the entity damaged matches the entity input. block:<block-matcher> to only run if the damage came from a block that matches the given material or location matcher. |
| Contexts | <context.entity> returns the EntityTag that was damaged.
<context.damager> returns the EntityTag damaging the other entity, if any.
<context.damager_block> returns the LocationTag of a block that damaged the entity, if any.
<context.cause> returns an ElementTag of reason the entity was damaged - see damage cause for causes.
<context.damage> returns an ElementTag(Decimal) of the amount of damage dealt.
<context.final_damage> returns an ElementTag(Decimal) of the amount of damage dealt, after armor is calculated.
<context.projectile> returns a EntityTag of the projectile, if one caused the event.
<context.damage_type_map> returns a MapTag the damage dealt by a specific damage type with keys: BASE, HARD_HAT, BLOCKING, ARMOR, RESISTANCE, MAGIC, ABSORPTION.
<context.was_critical> returns 'true' if the damage was a critical hit. (Warning: this value is calculated and not guaranteed to be correct if the event is altered).
|
| Determine | ElementTag(Decimal) to set the amount of damage the entity receives.
"CLEAR_MODIFIERS" to zero out all damage modifiers other than "BASE", effectively making damage == final_damage. |
| 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 | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityDamagedScriptEvent.java#L35 |
| Name | entity dies|death |
| Event Lines | <entity> dies|death |
| Triggers | when an entity dies. Note that this fires *after* the entity dies, and thus some data may be lost from the entity.
The death can only be cancelled on Paper. |
| Generated Examples | after entity death:
after command_block_minecart death: |
| Has Player | when the entity that died is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Has NPC | when the entity that died is an NPC. |
| Switches | by:<entity> to only process the event if the killer is known and matches the specified entity matcher.
cause:<cause> to only process the event if it was caused by a specific damage cause. |
| Contexts | <context.entity> returns the EntityTag that died.
<context.damager> returns the EntityTag damaging the other entity, if any.
<context.projectile> returns the EntityTag of a projectile used to kill the entity, if one was used.
<context.message> returns an ElementTag of a player's death message.
<context.cause> returns an ElementTag of the cause of the death. See damage cause for a list of possible damage causes.
<context.drops> returns a ListTag of all pending item drops.
<context.xp> returns an ElementTag of the amount of experience to be dropped.
<context.keep_inventory> returns true if the player dying is set to keep their inventory, false if not, or null if the dying entity is not a player.
|
| Determine | ElementTag to change the death message.
"NO_DROPS" to specify that any drops should be removed. "NO_XP" to specify that any XP orbs should be removed. ListTag(ItemTag) to specify new items to be dropped. ElementTag(Number) to specify the new amount of XP to be dropped. "KEEP_INV" to specify (if a player death) that the inventory should be kept. "KEEP_LEVEL" to specify (if a player death) that the XP level should be kept. "NO_MESSAGE" to hide a player death message. |
| 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 | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityDeathScriptEvent.java#L27 |
| Name | entity drops item |
| Event Lines | <entity> drops <item> |
| Triggers | when an entity drops an item. |
| Generated Examples | after trident drops item:
after mob drops rose_bush: |
| Has Player | When the entity dropping an item is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Contexts | <context.item> returns the ItemTag.
<context.entity> returns a EntityTag of the item.
<context.dropped_by> returns the EntityTag that dropped the item.
<context.location> returns a LocationTag of the item's location.
|
| 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 | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityDropsItemScriptEvent.java#L18 |
| Name | entity enters portal |
| Event Lines | <entity> enters portal |
| Triggers | when an entity enters a portal. That is, when the entity touches a portal block. |
| Generated Examples | on pale_oak_boat enters portal:
after player enters portal: |
| Has Player | when the entity that entered the portal is a player - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Has NPC | when the entity that entered the portal is an NPC. |
| Contexts | <context.entity> returns the EntityTag.
<context.location> returns the LocationTag of the portal block touched by the entity.
|
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityEntersPortalScriptEvent.java#L15 |
| Name | entity enters vehicle |
| Event Lines | entity enters vehicle
<entity> enters <entity> |
| Triggers | when an entity mounts another entity. |
| Generated Examples | after entity enters vehicle:
on entity enters vehicle: after living enters entity: |
| Has Player | when the entity that mounted the vehicle is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Has NPC | when the entity that mounted the vehicle is an NPC. |
| Contexts | <context.vehicle> returns the EntityTag of the mounted vehicle.
<context.entity> returns the EntityTag of the entering entity.
|
| 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 | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityEntersVehicleScriptEvent.java#L17 |
| Name | entity exits portal |
| Event Lines | <entity> exits portal |
| Triggers | when an entity exits a portal. This uses Spigot 'EntityPortalExitEvent' which seems to no longer be called on modern server versions. |
| Generated Examples | on entity exits portal:
after entity exits portal: |
| Has Player | when the entity that exits the portal is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Has NPC | when the entity that exits the portal is an NPC. |
| Contexts | <context.entity> returns the EntityTag.
<context.location> returns the LocationTag of the portal block touched by the entity.
|
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityExitsPortalScriptEvent.java#L15 |
| Name | entity exits vehicle |
| Event Lines | entity exits vehicle
<entity> exits <entity> |
| Triggers | when an entity dismounts from another entity. |
| Generated Examples | after entity exits vehicle:
on entity exits entity: after hanging exits living: |
| Has Player | when the entity that dismounts the vehicle is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Has NPC | when the entity that dismounts the vehicle is an NPC. |
| Contexts | <context.vehicle> returns the EntityTag of the mount vehicle.
<context.entity> returns the EntityTag of the exiting entity.
|
| 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 | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityExitsVehicleScriptEvent.java#L14 |
| Name | entity explodes |
| Event Lines | <entity> explodes |
| Triggers | when an entity explodes (primed_tnt, creeper, etc). |
| Generated Examples | after bat explodes:
on entity explodes: |
| Contexts | <context.blocks> returns a ListTag of blocks that the entity blew up.
<context.entity> returns the EntityTag that exploded.
<context.location> returns the LocationTag the entity blew up at.
<context.strength> returns an ElementTag(Decimal) of the strength of the explosion.
|
| Determine | ListTag(LocationTag) to set a new lists of blocks that are to be affected by the explosion.
ElementTag(Decimal) to change the strength of the explosion. |
| 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 | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityExplodesScriptEvent.java#L20 |
| Name | entity explosion primes |
| Event Lines | <entity> explosion primes |
| Triggers | when an entity decides to explode. |
| Generated Examples | after player explosion primes:
on fish explosion primes: |
| Contexts | <context.entity> returns an EntityTag of the exploding entity.
<context.radius> returns the explosion's radius.
<context.fire> returns whether the explosion will create fire.
|
| Determine | ElementTag(Decimal) to change the explosion radius.
"FIRE:<ElementTag(Boolean)>" to set whether the explosion will produce fire. |
| 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 | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityExplosionPrimesScriptEvent.java#L14 |
| Name | entity forms block |
| Event Lines | <entity> forms <block> |
| Triggers | when a block is formed by an entity.
For example, when a snowman forms snow. |
| Generated Examples | after entity forms orange_stained_glass_pane:
on entity forms mangrove_roots: |
| Contexts | <context.location> returns the LocationTag the block.
<context.material> returns the MaterialTag of the block.
<context.entity> returns the EntityTag that formed the block.
|
| 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 | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityFormsBlockScriptEvent.java#L16 |
| Name | entity goes into block |
| Event Lines | <entity> goes into <block> |
| Triggers | when an entity enters, and is stored in a block (eg a bee enters a bee nest).
Does not fire when a silverfish "enters" a stone block. Prefer entity changes block for that. |
| Generated Examples | after iron_golem goes into block:
on entity goes into bubble_coral_fan: |
| Contexts | <context.entity> returns the EntityTag.
<context.location> returns the LocationTag of the block entered by the entity.
<context.material> returns the MaterialTag of the block entered by the entity.
|
| 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 | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityGoesIntoBlockScriptEvent.java#L16 |
| Name | entity heals because cause |
| Event Lines | <entity> heals (because <cause>) |
| Triggers | when an entity heals. |
| Generated Examples | after vehicle heals because cause:
after animal heals because cause: |
| Has Player | when the entity that was healed is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Has NPC | when the entity that was healed was an NPC. |
| Contexts | <context.amount> returns the amount the entity healed.
<context.entity> returns the EntityTag that healed.
<context.reason> returns the cause of the entity healing. Can be: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityRegainHealthEvent.RegainReason.html
|
| Determine | ElementTag(Decimal) to set the amount of health the entity receives. |
| 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 | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityHealsScriptEvent.java#L15 |
| Name | entity interacts with block |
| Event Lines | <entity> interacts with <block> |
| Triggers | when an entity interacts with a block (EG an arrow hits a button) |
| Generated Examples | after entity interacts with block:
after living interacts with yellow_terracotta: |
| Contexts | <context.location> returns a LocationTag of the block being interacted with.
<context.entity> returns a EntityTag of the entity doing the interaction.
|
| 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 | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityInteractScriptEvent.java#L16 |
| Name | entity potion effects modified |
| Event Lines | <entity> potion effects modified
<entity> potion effects <change_action> |
| Triggers | when an entity's potion effects change. |
| Generated Examples | on entity potion effects modified:
after entity potion effects change_action: after living potion effects modified: after egg potion effects change_action: |
| Has Player | when the entity that has changed is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Has NPC | when the entity that has changed is an NPC. |
| Switches | cause:<cause> to only process the event when it came from a specified cause.
effect:<effect type> to only process the event when a specified potion effect is applied. |
| Contexts | <context.entity> returns the EntityTag.
<context.cause> returns the cause of the effect change, based on https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityPotionEffectEvent.Cause.html
<context.action> returns the action of the effect changed, which can be 'added', 'changed', 'cleared', or 'removed'
<context.override> returns whether the new potion effect will override the old.
<context.new_effect_data> returns the new potion effect in Potion Effect Format.
<context.old_effect_data> returns the old potion effect in Potion Effect Format.
<context.effect_type> returns the name of the modified potion effect type.
|
| Determine | "OVERRIDE:<ElementTag(Boolean)>" to set whether the new potion effect should override. |
| 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 | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityPotionEffectScriptEvent.java#L17 |
| Name | entity resurrected |
| Event Lines | <entity> resurrected |
| Triggers | when an entity dies and is resurrected by a totem. |
| Generated Examples | on wither_skull resurrected:
after entity resurrected: |
| Has Player | when the entity being resurrected is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Contexts | <context.entity> returns the EntityTag being resurrected.
<context.hand> returns which hand the totem was in during resurrection, if any. Can be either HAND or OFF_HAND. Available only on MC 1.19+.
|
| 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 | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityResurrectScriptEvent.java#L17 |
| Name | entity shoots bow |
| Event Lines | entity shoots bow
<entity> shoots <item> |
| Triggers | when an entity shoots something out of a bow. |
| Generated Examples | after entity shoots bow:
after living shoots mutton: on entity shoots bow: after entity shoots oxidized_copper_door: |
| Has Player | when the entity that shot the bow is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Has NPC | when the entity that shot the bow is an NPC. |
| Contexts | <context.entity> returns the EntityTag that shot the bow.
<context.projectile> returns a EntityTag of the projectile.
<context.bow> returns the ItemTag of the bow used to shoot.
<context.force> returns the force of the shot.
<context.item> returns an ItemTag of the shot projectile, if any.
<context.hand> returns "HAND" or "OFF_HAND" for which hand the bow was in.
|
| Determine | ListTag(EntityTag) to change the projectile(s) being shot. (Note that in certain cases, determining an arrow may not be valid).
"KEEP_ITEM" to keep the projectile item on shooting it. |
| 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 | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityShootsBowScriptEvent.java#L27 |
| Name | entity tamed |
| Event Lines | entity tamed
<entity> tamed
player tames entity
player tames <entity> |
| Triggers | when an entity is tamed. |
| Generated Examples | on entity tamed:
after fish tamed: on player tames entity: after player tames hanging: after entity tamed: after player tames entity: |
| Has Player | when a player is what tamed the entity. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Contexts | <context.entity> returns a EntityTag of the tamed entity.
<context.owner> returns a EntityTag of the owner.
|
| 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 | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityTamesScriptEvent.java#L15 |
| Name | entity targets entity because cause |
| Event Lines | <entity> targets (<entity>) (because <cause>) |
| Triggers | when an entity targets a new entity (usually a hostile mob preparing to attack something), or un-targets one. |
| Generated Examples | after skeleton_horse targets:
after shulker_bullet targets: |
| Has Player | when the entity being targetted is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Contexts | <context.entity> returns the targeting entity.
<context.reason> returns the reason the entity changed targets. Refer to https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityTargetEvent.TargetReason.html.
<context.target> returns the targeted entity, if any.
|
| Determine | EntityTag to make the entity target a different entity instead. |
| 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 | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityTargetsScriptEvent.java#L16 |
| Name | entity teleports |
| Event Lines | entity teleports
<entity> teleports |
| Triggers | when an entity teleports. |
| Generated Examples | after entity teleports:
after monster teleports: after turtle teleports: |
| Has Player | when the entity being teleported is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Has NPC | when the entity being teleported is an NPC. |
| Switches | cause:<cause> to only process the event when it came from a specified cause. |
| Contexts | <context.entity> returns the EntityTag.
<context.origin> returns the LocationTag the entity teleported from.
<context.destination> returns the LocationTag the entity teleported to.
<context.cause> returns an ElementTag of the teleport cause - see teleport cause for causes.
|
| Determine | "ORIGIN:<LocationTag>" to change the location the entity teleported from.
"DESTINATION:<LocationTag>" to change the location the entity teleports to. |
| 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 | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityTeleportScriptEvent.java#L32 |
| Name | entity toggles|starts|stops gliding |
| Event Lines | <entity> toggles|starts|stops gliding |
| Triggers | when an entity starts or stops gliding. |
| Generated Examples | on item_frame toggles gliding:
on entity starts gliding: |
| Has Player | when the entity is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Has NPC | when the entity is an NPC. |
| Contexts | <context.entity> returns the EntityTag of this event.
<context.state> returns an ElementTag(Boolean) with a value of "true" if the entity is now gliding and "false" otherwise.
|
| 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 | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityGlideScriptEvent.java#L15 |
| Name | entity toggles|starts|stops swimming |
| Event Lines | <entity> toggles|starts|stops swimming |
| Triggers | when an entity starts or stops swimming. |
| Generated Examples | after animal toggles swimming:
on magma_cube toggles swimming: |
| Has Player | when the entity is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Has NPC | when the entity is an NPC. |
| Contexts | <context.entity> returns the EntityTag of this event.
<context.state> returns an ElementTag(Boolean) with a value of "true" if the entity is now swimming and "false" otherwise.
|
| 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 | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntitySwimScriptEvent.java#L15 |
| Name | entity transforms |
| Event Lines | entity transforms
<entity> transforms (into <entity>) |
| Triggers | when an entity transforms into different entities (including villager infections, slime splitting, etc). |
| Generated Examples | after entity transforms:
on rabbit transforms: on entity transforms: on zoglin transforms into donkey: |
| Switches | because:<reason> to only process the event if a specific reason caused the transformation. |
| Contexts | <context.entity> returns the old entity that was transformed from.
<context.new_entities> returns a list of new entities that were transformed into.
<context.cause> returns the reason for transformation, from https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityTransformEvent.TransformReason.html.
|
| 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 | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityTransformScriptEvent.java#L15 |
| Name | entity unleashed because reason |
| Event Lines | <entity> unleashed (because <reason>) |
| Triggers | when an entity is unleashed. |
| Generated Examples | after mob unleashed because reason:
on parrot unleashed because reason: |
| Has NPC | when the entity being unleashed is an NPC. |
| Contexts | <context.entity> returns the EntityTag.
<context.reason> returns an ElementTag of the reason for the unleashing.
Reasons include DISTANCE, HOLDER_GONE, PLAYER_UNLEASH, and UNKNOWN
|
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityUnleashedScriptEvent.java#L13 |
| Name | horse jumps |
| Event Lines | horse jumps
<entity> jumps |
| Triggers | when a horse jumps. |
| Generated Examples | on horse jumps:
after animal jumps: after entity jumps: |
| Contexts | <context.entity> returns the EntityTag of the horse.
<context.color> returns an ElementTag of the horse's color.
<context.power> returns an ElementTag(Decimal) of the jump's power.
|
| Determine | ElementTag(Decimal) to set the power of the jump. |
| 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 | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/HorseJumpsScriptEvent.java#L16 |
| Name | projectile hits |
| Event Lines | <projectile> hits |
| Triggers | When a projectile hits a block or an entity. |
| Generated Examples | on projectile hits:
after projectile hits: |
| Has Player | when the entity that was hit is a player, or when the shooter is a player if no entity was hit. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Has NPC | when the entity that was hit is a npc, or when the shooter is a npc if no entity was hit. |
| Switches | entity:<entity> to only process the event if an entity got hit, and it matches the specified EntityTag matcher.
block:<block> to only process the event if a block got hit, and it matches the specified LocationTag matcher. shooter:<entity> to only process the event if the projectile was shot by an entity, and it matches the specified EntityTag matcher. |
| Contexts | <context.projectile> returns an EntityTag of the projectile.
<context.hit_entity> returns an EntityTag of the entity that was hit, if any.
<context.hit_block> returns a LocationTag of the block that was hit, if any.
<context.hit_face> returns a LocationTag vector of the hit normal (like '0,1,0' if the projectile hit the top of a block).
<context.shooter> returns an EntityTag of the entity that shot the projectile, if any.
|
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Synonyms (Search Aid) | entity shoots |
| Group | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/ProjectileHitScriptEvent.java#L17 |
| Name | projectile hits block/entity |
| Event Lines | <projectile> hits <block/entity>
<entity> shoots <material> (with <projectile>) |
| Triggers | N/A - deprecated in favor of projectile hits |
| Generated Examples | after arrow hits block/entity:
after skeleton shoots light_blue_stained_glass_pane: on projectile hits block/entity: on entity shoots red_mushroom_block: |
| Group | Entity |
| Deprecated | use new 'projectile hits' unified event |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/ProjectileHitScriptEvent.java#L48 |
| Name | projectile launched |
| Event Lines | projectile launched
<entity> launched |
| Triggers | when a projectile is launched. |
| Generated Examples | on projectile launched:
after entity launched: after projectile launched: after monster launched: |
| Switches | by:<entity> to only process the event if the projectile shooter matches the specified entity matcher. |
| Contexts | <context.projectile> returns an EntityTag of the projectile.
<context.shooter> returns an EntityTag of the entity that shot the projectile, if any.
|
| 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 | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/ProjectileLaunchedScriptEvent.java#L15 |
| Name | spawner spawns entity |
| Event Lines | spawner spawns <entity> |
| Triggers | when an entity spawns from a monster spawner. |
| Generated Examples | after spawner spawns entity:
on spawner spawns entity: |
| Switches | spawner:<location> to only process the event if the spawner's location matches. |
| Contexts | <context.entity> returns the EntityTag that spawned.
<context.location> returns the LocationTag the entity will spawn at.
<context.spawner_location> returns the LocationTag of the monster spawner.
|
| 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 | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntitySpawnerSpawnScriptEvent.java#L16 |
| Name | entity despawns |
| Event Lines | <entity> despawns |
| Triggers | when an entity despawns permanently from the world. May fire repeatedly for one entity. |
| Generated Examples | on monster despawns:
on entity despawns: |
| Has NPC | when the entity that despawned is an NPC. |
| Switches | cause:<cause> to only process the event when it came from a specified cause. |
| Contexts | <context.entity> returns the entity that despawned.
<context.cause> returns the reason the entity despawned. Can be: DEATH, CHUNK_UNLOAD, CITIZENS, or OTHER
|
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Entity |
| Warning(s) | this event fires very rapidly. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityDespawnScriptEvent.java#L12 |
| Name | entity enters|exits area |
| Event Lines | <entity> enters|exits <area> |
| Triggers | when an entity enters or exits a noted area (cuboid, ellipsoid, or polygon). On Spigot servers, only fires for players. Paper is required for other mob types. |
| Generated Examples | after skeleton_horse exits area:
after area_effect_cloud enters area: |
| Has Player | When the entity is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Contexts | <context.area> returns the area object that was entered or exited.
<context.cause> returns the cause of the event. Can be: WALK, WORLD_CHANGE, JOIN, QUIT, TELEPORT, VEHICLE.
<context.to> returns the location the entity moved to (might not be available in exit events).
<context.from> returns the location the entity moved from (when available, depending on cause).
<context.entity> returns the entity that entered/exited an area.
|
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Group | Entity |
| Warning(s) | cancelling this event will have different results depending on the cause. Teleporting the entity away 1 tick later might be safer. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/AreaEnterExitScriptEvent.java#L31 |
| Name | entity killed by cause |
| Event Lines | <entity> killed (by <cause>)
<entity> killed (by <entity>)
<entity> kills <entity> |
| Triggers | when an entity is killed. |
| Generated Examples | after bamboo_raft killed:
after enderman killed by entity: on llama_spit kills entity: after projectile killed: after guardian killed by pillager: after zombified_piglin kills mooshroom: |
| Has Player | when the killer or entity that was killed is a player. Cannot be both. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Has NPC | when the killer or entity that was killed is an NPC. Cannot be both. |
| Contexts | <context.entity> returns the EntityTag that was killed.
<context.cause> returns an ElementTag of reason the entity was damaged - see damage cause for causes.
<context.damage> returns an ElementTag(Decimal) of the amount of damage dealt.
<context.final_damage> returns an ElementTag(Decimal) of the amount of damage dealt, after armor is calculated.
<context.damager> returns the EntityTag damaging the other entity.
<context.projectile> returns a EntityTag of the projectile shot by the damager, if any.
<context.damage_type_map> returns a MapTag the damage dealt by a specific damage type with keys: BASE, HARD_HAT, BLOCKING, ARMOR, RESISTANCE, MAGIC, ABSORPTION.
|
| Determine | ElementTag(Decimal) to set the amount of damage the entity receives, instead of dying. |
| 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 | Entity |
| Warning(s) | This event may mis-fire in some cases, particularly with plugins or scripts modify the damage from scripts. If you need reliable death tracking, the entity death event may be better. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityKilledScriptEvent.java#L22 |
| Name | entity spawns because cause |
| Event Lines | <entity> spawns (because <cause>) |
| Triggers | when an entity spawns. |
| Generated Examples | on mob spawns:
after living spawns because cause: |
| Contexts | <context.entity> returns the EntityTag that spawned.
<context.location> returns the location the entity will spawn at.
<context.reason> returns the reason the entity spawned, can be ENTITY_SPAWN or any of: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/CreatureSpawnEvent.SpawnReason.html
<context.spawner_location> returns the location of the mob spawner, when reason is SPAWNER.
|
| 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 | Entity |
| Warning(s) | This event may fire very rapidly. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntitySpawnScriptEvent.java#L19 |
| Name | entity picks up item |
| Event Lines | <entity> picks up <item>
<entity> takes <item> |
| Triggers | when an entity picks up an item. |
| Generated Examples | after drowned picks up wither_skeleton_skull:
after entity takes pumpkin: after npc picks up infested_chiseled_stone_bricks: on entity takes diamond_hoe: |
| Has Player | when the entity picking up the item is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Has NPC | when the entity picking up the item is an npc. |
| Contexts | <context.item> returns an ItemTag of the item being picked up.
<context.entity> returns an EntityTag of the item entity being picked up.
<context.pickup_entity> returns an EntityTag of the entity picking up the item.
<context.location> returns a LocationTag of the item's location.
|
| Determine | "ITEM:<ItemTag>" to change the item being picked up. |
| 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/entity/EntityPicksUpItemScriptEvent.java#L20 |
| Name | player fishes entity while state |
| Event Lines | player fishes (<entity>) (while <state>)
player fishes (<item>) (while <state>) |
| Triggers | when a player uses a fishing rod. |
| Generated Examples | after player fishes:
after player fishes oak_pressure_plate while state: on player fishes while state: |
| Has Player | If the fisher or the caught entity is a player (in most cases, the fisher can be assumed to be a real player). - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Has NPC | If the fisher or the caught entity is an NPC. |
| Switches | with:<item> to only process the event if the fishing rod is a specified item. |
| Contexts | <context.hook> returns an EntityTag of the hook.
<context.state> returns an ElementTag of the fishing state. Valid states: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerFishEvent.State.html
<context.entity> returns an EntityTag of the entity that got caught.
<context.item> returns an ItemTag of the item gotten, if any.
<context.xp> returns the amount of experience that will drop.
|
| Determine | "CAUGHT:<ItemTag>" to change the item that was caught (only if an item was already being caught).
"XP:<ElementTag(Number)>" to change how much experience will drop. |
| 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/PlayerFishesScriptEvent.java#L21 |
| Name | player leashes entity |
| Event Lines | player leashes entity
player leashes <entity> |
| Triggers | when a player leashes an entity. |
| Generated Examples | on player leashes entity:
after player leashes glow_item_frame: after player leashes 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 leashed entity.
<context.holder> returns the EntityTag that is holding the leash.
|
| 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/PlayerLeashesEntityScriptEvent.java#L15 |
| Name | player shears entity |
| Event Lines | player shears <entity>
player shears <color> sheep |
| Triggers | when a player shears an entity. |
| Generated Examples | after player shears monster:
on player shears color sheep: on player shears mangrove_boat: after player shears color sheep: |
| 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 sheep.
|
| 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/PlayerShearsScriptEvent.java#L17 |
| Name | player steers entity |
| Event Lines | player steers entity
player steers <entity> |
| Triggers | every tick that a player is controlling a vehicle. Use player input on MC 1.21+. |
| Generated Examples | after player steers entity:
on player steers witch: on player steers entity: |
| Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Contexts | <context.entity> returns the EntityTag being steered by the player.
<context.sideways> returns an ElementTag(Decimal) where a positive number signifies leftward movement.
<context.forward> returns an ElementTag(Decimal) where a positive number signifies forward movement.
<context.jump> returns an ElementTag(Boolean) that signifies whether the player is attempting to jump with the entity.
<context.dismount> returns an ElementTag(Boolean) that signifies whether the player is attempting to dismount.
|
| 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 |
| Deprecated | Use the 'player input' event on MC 1.21+. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerSteersEntityScriptEvent.java#L19 |
| Name | player right clicks entity |
| Event Lines | player right clicks <entity> |
| Triggers | when a player right clicks on an entity. |
| Generated Examples | after player right clicks entity:
after player right clicks cave_spider: |
| 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 |
| Name | vehicle collides with entity |
| Event Lines | vehicle collides with entity
vehicle collides with <entity>
<vehicle> collides with entity
<vehicle> collides with <entity> |
| Triggers | when a vehicle collides with an entity. |
| Example | |
| Example | |
| Example | |
| Has Player | when a vehicle collides with a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Has NPC | when a vehicle collides with an NPC. |
| Switches | type:<entity> to only process the event if the colliding entity matches the EntityTag matcher input. |
| Contexts | <context.vehicle> returns the EntityTag of the vehicle.
<context.entity> returns the EntityTag of the entity the vehicle has collided with.
<context.pickup> returns whether the vehicle can pick up the entity.
|
| Determine | "PICKUP:<ElementTag(Boolean)>" to set whether the vehicle is allowed to pick up the entity or not. |
| 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 | Vehicle |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/vehicle/VehicleCollidesEntityScriptEvent.java#L16 |
| Name | vehicle damaged |
| Event Lines | <vehicle> damaged
<entity> damages <vehicle> |
| Triggers | when a vehicle is damaged. |
| Example | |
| Example | |
| Example | |
| Has NPC | when the entity that damaged the vehicle is an NPC. |
| Switches | type:<vehicle> to only run if the vehicle damaged matches the EntityTag matcher input. |
| Contexts | <context.vehicle> returns the EntityTag of the vehicle.
<context.entity> returns the EntityTag of the attacking entity.
<context.damage> returns the amount of damage to be received.
|
| Determine | ElementTag(Decimal) to set the value of the damage received by the vehicle. |
| 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 | Vehicle |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/vehicle/VehicleDamagedScriptEvent.java#L15 |
| Name | vehicle destroyed |
| Event Lines | vehicle destroyed
<vehicle> destroyed
entity destroys vehicle
<entity> destroys vehicle
entity destroys <vehicle>
<entity> destroys <vehicle> |
| Triggers | when a vehicle is destroyed. |
| Generated Examples | after vehicle destroyed:
on entity destroys vehicle: after villager destroys vehicle: after entity destroys minecart: after bamboo_raft destroys horse: on minecart destroyed: after silverfish destroys vehicle: on entity destroys minecart: |
| Has NPC | when the entity that destroyed the vehicle is an NPC. |
| Contexts | <context.vehicle> returns the EntityTag of the vehicle.
<context.entity> returns the EntityTag of the attacking entity.
|
| 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 | Vehicle |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/vehicle/VehicleDestroyedScriptEvent.java#L14 |
| Name | crackshot weapon damages entity |
| Event Lines | crackshot weapon damages entity |
| Triggers | when an entity is damaged by a CrackShot weapon. |
| Generated Examples | after crackshot weapon damages entity: |
| Has Player | Always - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Contexts | <context.damager> returns the entity that did the damage. This can be a projectile, or TNT.
<context.weapon> returns the name of the weapon that did the damage.
<context.victim> returns the entity that was damaged.
<context.damage> returns the amount of damage dealt.
<context.backstab> returns if the attack was a back-stab.
<context.critical> returns if the attack was a critical hit.
<context.headshot> returns if the attack was a head-shot.
|
| Determine | ElementTag(Decimal) to set damage dealt. |
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Group | Depenizen |
| Requires | Depenizen, CrackShot |
| Source | https://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/events/crackshot/CrackShotWeaponDamageEntityEvent.java#L16 |
| Name | magicspells entity casts spell |
| Event Lines | magicspells <entity> casts <spell> |
| Triggers | when an entity starts to cast a spell. |
| Generated Examples | on magicspells firework_rocket casts spell:
after magicspells entity casts spell: |
| Has Player | When the caster is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Contexts | <context.spell_name> returns the name of the spell.
<context.caster> returns the entity that cast the spell.
<context.power> returns an ElementTag(Decimal) of the power of the spell.
<context.cast_time> returns an ElementTag(Number) of the cast time of the spell.
<context.cooldown> returns an ElementTag(Decimal) of the cooldown of the spell.
<context.spell_reagent_TYPE> returns an ElementTag(Number) of the reagent cost for the given type. Valid types are: mana, health, hunger, experience, levels, durability, money
<context.spell_reagent_variables> returns a ListTag in the form variable/cost|...
<context.spell_reagent_items> returns a ListTag of ItemTags of reagent cost.
|
| Determine | "POWER:<ElementTag(Number)>" to change the power of the spell.
"CAST_TIME:<ElementTag(Decimal)>" to change the cast time. "COOLDOWN:<ElementTag(Number)>" to change the cooldown. "REAGENT:<TYPE>:<ElementTag(Number)>" to change the reagent cost of the given type. Valid types are: mana, health, hunger, experience, levels, durability, money "REAGANT:VARIABLE:<NAME>:<ElementTag(Decimal)>" to change the reagant cost for the given variable name. "REAGENT:ITEMS:<ListTag(ItemTag)>" to change the reagent item cost. "CLEAR_REAGENTS" to clear away all reagent costs. |
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Group | Depenizen |
| Requires | Depenizen, MagicSpells |
| Source | https://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/events/magicspells/SpellCastScriptEvent.java#L26 |
| Name | magicspells entity completes spell |
| Event Lines | magicspells entity completes spell
magicspells <entity> completes spell |
| Triggers | when the spell is done and everything has been handled. |
| Generated Examples | after magicspells entity completes spell:
on magicspells vehicle completes spell: after magicspells monster completes spell: |
| Has Player | When the caster is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Contexts | <context.spell_name> returns the name of the spell.
<context.caster> returns the entity that casted the spell.
<context.power> returns an ElementTag(Decimal) of the power of the spell.
<context.cooldown> returns an ElementTag(Decimal) of the cooldown of the spell.
|
| Group | Depenizen |
| Requires | Depenizen, MagicSpells |
| Source | https://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/events/magicspells/SpellCastedScriptEvent.java#L15 |
| Name | entity added to world |
| Event Lines | <entity> added to world |
| Triggers | any time an entity is added to the world for any reason, including chunks loading pre-existing entities. |
| Generated Examples | after entity added to world: |
| Contexts | <context.entity> returns the EntityTag that will be added. Note that this entity will not necessarily be fully spawned yet, so usage will be limited.
<context.location> returns the LocationTag that the entity will be added at.
|
| 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/EntityAddToWorldScriptEvent.java#L15 |
| Name | entity loads crossbow |
| Event Lines | <entity> loads crossbow |
| Triggers | when a living entity loads a crossbow with a projectile. |
| Generated Examples | after entity loads crossbow:
on tropical_fish loads crossbow: |
| Has Player | when the entity is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Has NPC | when the entity is an NPC. |
| Switches | crossbow:<item> to only process the event if the crossbow is a specified item. |
| Contexts | <context.entity> returns the EntityTag that is loading the crossbow.
<context.crossbow> returns the ItemTag of the crossbow.
<context.consumes> returns true if the loading will consume a projectile item, otherwise false.
<context.hand> returns "HAND" or "OFF_HAND" depending on which hand is holding the crossbow item.
|
| Determine | "KEEP_ITEM" to keep the projectile item in the shooter's inventory. |
| 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 | Paper |
| Requires | Paper |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/events/EntityLoadCrossbowScriptEvent.java#L16 |
| Name | entity pathfinds |
| Event Lines | <entity> pathfinds |
| Triggers | when an entity starts pathfinding towards a location or entity. |
| Generated Examples | after animal pathfinds:
after npc pathfinds: |
| Has Player | when the target entity is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Has NPC | when the target entity is an NPC. |
| Switches | to:<area> to only process the event if the entity is pathfinding into a specified area.
at:<entity> to only process the event when the entity is pathfinding at a specified entity. |
| Contexts | <context.entity> returns the EntityTag that is pathfinding.
<context.location> returns the LocationTag that is being pathfound to.
<context.target> returns the EntityTag that is being targeted, if any.
|
| 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 | Paper |
| Requires | Paper |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/events/EntityPathfindScriptEvent.java#L16 |
| Name | entity removed from world |
| Event Lines | <entity> removed from world |
| Triggers | any time an entity is removed from the world for any reason, including chunks unloading. |
| Generated Examples | after stray removed from world:
after vex removed from world: |
| Contexts | <context.entity> returns the EntityTag that will be removed. Note that this entity will not necessarily be fully spawned at time of firing, so usage will be limited.
|
| 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/EntityRemoveFromWorldScriptEvent.java#L14 |
| Name | entity teleported by portal |
| Event Lines | <entity> teleported by portal |
| Triggers | When an entity is about to be teleported by a portal (currently only fires for nether portals). |
| Generated Examples | after fish teleported by portal:
after animal teleported by portal: |
| Switches | to:<world> to only process the event if the world the entity is being teleported to matches the specified WorldTag matcher.
portal_type:<type> to only process the event if the portal's type matches the specified portal type. |
| Contexts | <context.entity> returns an EntityTag of the entity being teleported.
<context.target_world> returns a WorldTag of the world the entity is being teleported to.
<context.portal_type> returns an ElementTag of the portal's type. Will be one of https://jd.papermc.io/paper/1.19/org/bukkit/PortalType.html.
|
| Determine | "TARGET_WORLD:<WorldTag>" to set the world the entity will be teleported to.
"REMOVE_TARGET_WORLD" to remove the target world. Should usually cancel the event instead of using this. |
| 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 | Paper |
| Requires | Paper |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/events/EntityTeleportedByPortalScriptEvent.java#L14 |
| Name | player names entity |
| Event Lines | player names <entity> |
| Triggers | when a player attempts to rename an entity with a name tag. |
| Generated Examples | after player names entity:
after player names text_display: |
| Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Contexts | <context.entity> returns an EntityTag of the renamed entity.
<context.old_name> returns the old name of the entity, if any.
<context.name> returns the new name of the entity.
<context.persistent> returns whether this will cause the entity to persist through server restarts.
|
| Determine | "NAME:<ElementTag>" to set a different name for the entity.
"PERSISTENT:<ElementTag(Boolean)>" to set whether the event will cause the entity to persist through restarts. NOTE: Entities may still persist for other reasons. To ensure they do not, use EntityTag.force_no_persist. |
| 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 | Paper |
| Requires | Paper |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/events/PlayerNamesEntityScriptEvent.java#L18 |
| 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 spectates entity |
| Event Lines | player spectates <entity> |
| Triggers | when a player starts spectating an entity. |
| Generated Examples | after player spectates entity:
after player spectates vehicle: |
| Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Contexts | <context.entity> returns the entity that is being spectated.
<context.old_entity> returns the entity that was previously being spectated (or the player themself if they weren't spectating anything).
|
| 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 | Paper |
| Requires | Paper |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/events/PlayerSpectatesEntityScriptEvent.java#L14 |
| Name | player stops spectating entity |
| Event Lines | player stops spectating (<entity>) |
| Triggers | when a player stops spectating an entity. |
| Generated Examples | on player stops spectating:
after player stops spectating: |
| Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Contexts | <context.entity> returns the entity that was being spectated.
|
| 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 | Paper |
| Requires | Paper |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/events/PlayerStopsSpectatingScriptEvent.java#L14 |
| Name | player tries to attack entity |
| Event Lines | player tries to attack <entity> |
| Triggers | when the player tries to attack an entity. This occurs before any of the damage logic, so cancelling this event will prevent any sort of sounds from being played when attacking. |
| Generated Examples | after player tries to attack entity:
on player tries to attack entity: |
| 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 the player attacks the entity with the specified item. |
| Contexts | <context.entity> returns the entity that was attacked in this event.
<context.will_attack> returns whether this entity would be attacked normally.
Entities like falling sand will return false because their entity type does not allow them to be attacked.
Note: there may be other factors (invulnerability, etc.) that will prevent this entity from being attacked that this event does not cover.
|
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Group | Paper |
| Requires | Paper |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/events/PrePlayerAttackEntityScriptEvent.java#L16 |
| Name | projectile collides with entity |
| Event Lines | <projectile> collides with <entity> |
| Triggers | N/A - use projectile hits with the 'entity' switch on versions above 1.19. |
| Generated Examples | on projectile collides with pillager:
after arrow collides with monster: |
| Has Player | When the entity collided with is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Has NPC | When the entity collided with is a NPC. |
| Contexts | <context.projectile> returns the projectile that is colliding.
<context.entity> returns the entity that was collided with.
|
| 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 | Paper |
| Requires | Paper |
| Deprecated | Use 'projectile hits' with the 'entity' switch on versions above 1.19. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/events/ProjectileCollideScriptEvent.java#L17 |
| Name | entity knocks back entity |
| Event Lines | <entity> knocks back <entity> |
| Triggers | when an entity is knocked back from the hit of another entity. |
| Generated Examples | after fish knocks back entity:
after animal knocks back vehicle: |
| Has Player | when the damager or damaged entity is a player. Cannot be both. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Has NPC | when the damager or damaged entity is an NPC. Cannot be both. |
| Switches | with:<item> to only process the event when the item used to cause damage (in the damager's hand) is a specified item. |
| Contexts | <context.entity> returns the EntityTag that was knocked back.
<context.damager> returns the EntityTag of the one who knocked.
<context.acceleration> returns the knockback applied as a vector.
<context.cause> returns the cause of the knockback (only on MC 1.20+). Causes list: https://jd.papermc.io/paper/1.21.1/io/papermc/paper/event/entity/EntityKnockbackEvent.Cause.html
|
| Determine | LocationTag as a vector to change the acceleration applied. |
| 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 | Paper |
| Requires | Paper |
| 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/paper/src/main/java/com/denizenscript/denizen/paper/events/EntityKnocksbackEntityScriptEvent.java#L17 |
| Name | entity prespawns because cause |
| Event Lines | <entity> prespawns (because <cause>) |
| Triggers | before a mob spawns and before the mob is created for spawning. Note that this has a limited number of use cases.
The intent of this event is to save server resources for blanket mob banning/limiting scripts. Use the entity spawn event as a backup. |
| Generated Examples | on allay prespawns because cause:
on npc prespawns: |
| Contexts | <context.entity> returns the EntityTag that will be spawned. Note that this entity will not be spawned yet, so usage will be limited.
<context.location> returns the LocationTag the entity will spawn at.
<context.reason> returns an ElementTag of the reason for spawning. Currently, this event only fires for NATURAL and SPAWNER reasons.
<context.spawner_location> returns the LocationTag of the spawner's location if this mob is spawning from a spawner.
|
| 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 | Paper |
| Requires | Paper |
| Warning(s) | This event may fire very rapidly, and only fires for NATURAL and SPAWNER reasons. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/events/PreEntitySpawnScriptEvent.java#L17 |
| Name | entity steps on block |
| Event Lines | entity steps on block
<entity> steps on <material> |
| Triggers | when a non-player entity steps onto a specific block material. For players, use player steps on block. |
| Example | |
| Example | |
| Example | |
| 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.
|
| 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 | Paper |
| Requires | Paper |
| Warning(s) | This event may fire very rapidly. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/events/EntityStepsOnScriptEvent.java#L15 |
| Name | player tracks|untracks entity |
| Event Lines | player tracks|untracks <entity> |
| Triggers | when 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 EntityTag.tracking_range. |
| Example | |
| Example | |
| Has Player | Always. - 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 Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Paper |
| Requires | Paper |
| Warning(s) | This event may fire very rapidly. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/events/PlayerTracksEntityScriptEvent.java#L16 |