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 | on entity dies:
after entity dies: |
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 | mythicmob mob dies|death|killed |
Event Lines | mythicmob <mob> dies|death|killed |
Triggers | when a MythicMob dies. |
Generated Examples | after mythicmob mob death:
after mythicmob mob killed: |
Switches | by:<entity> to only process the event if the killer matches a specified entity type. |
Contexts | <context.mob> Returns the MythicMob that has been killed.
<context.entity> Returns the EntityTag for the MythicMob.
<context.killer> returns the EntityTag that killed the MythicMob (if available).
<context.level> Returns the level of the MythicMob.
<context.drops> Returns a list of items dropped.
|
Determine | ListTag(ItemTag) to specify new items to be dropped. |
Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
Group | Depenizen |
Requires | Depenizen, MythicMobs |
Source | https://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/events/mythicmobs/MythicMobsDeathEvent.java#L22 |