This page explains the use of "tools." A tool describes the inventory item, creature, or phenomenon which triggered a particular drop event. It can be checked using the "
tool:" parameter (for syntax tips, see the Drop file page).
- All items can be used as tools. This indicates the item was in hand when the player triggered the action.
- All blocks can be used as tools. This indicates the block was in hand, as above, though some blocks aren't normally found in players' inventories (see the Entity List for details).
AIRcan be used to denote an empty hand.
- Creatures can also be used as tools. This refers to the killing of some creature (or the player) by another creature, where the "tool" is defined as the creature that did the killing.
Tools can be specified with embedded data values.
You can specify an event to only happen when triggered by a tool with a specific name attached to it. Remember that it's recommended to include colour coding in your tool names, because players can rename items via anvils! (Players cannot add colours to the items they rename.)
You can specify a name on a tool like so:
An example would be this:
[email protected]!~&9Super Shovel
If you want to combine enchantments and names, you need to specify the name last, like so:
[email protected]!THORNS#1~Thorny Shirt
If you want to specify a name alone, you can use just
"~" without the "@!", but if you want to indicate an enchantment or some other extra data like damage values, you must include both "@" and "!", as "@" parses for extra data (including enchantments), and "!" parses for each enchantment.
- ANY / ALL
- matches any tool (this is default behavior if "
tool:" isn't specified)
- object was destroyed/killed by some player
- [email protected]<name>
- [email protected]<groupname>
- not presently supported (as Bukkit permissions doesn't support groups)
- death/breakage by any
Applicable to Player/Creatures
- death by FIRE_TICK, FIRE or LAVA.
- death by fire (could have been set on fire for various reasons)
- death by immersion in lava (if set on fire by lava and dying then DAMAGE_FIRE applies)
- death by any creature, but only direct attacks; doesn't match projectiles
- death by block explosion (i.e. TNT)
- death by non-block entity explosion (i.e. creeper)
- death by block contact (i.e. cactus)
- death by drowning
- death from fall damage
- death by suffocation (head in a block)
- player died from starvation
Applicable to Blocks
- destroyed by flowing water (Note: This feature is currently defunct.)
- death by flying arrow
- death by fireball; alias:
- death by thrown egg 1
- death by fishing lure 1; alias:
- death by thrown snowball 1
- death by any projectile above (or any unclassified projectile)
1 These projectiles are normally harmless, but a separate plugin could change this behavior.
Projectiles support the optional data values @PLAYER and @DISPENSER to distinguish between projectiles fired by a player or by a dispenser.
- death by creeper explosion (or use some other creature name here if using a plugin that lets other creatures explode)
- death by TNT explosion
- death by fireball explosion (ghast); alias:
- death by any explosion above (or any unclassified explosion that originates from an entity)
Multiple tools can be listed in square brackets to indicate all are valid, such as
tool: [DIAMOND_SWORD, GOLD_SWORD] to indicate a drop event which can be triggered using either a diamond sword or a gold sword.
Tools can also be excluded in the list by using a minus in front, eg:
tool: [ANY_PICKAXE, -GOLD_PICKAXE]