Denizen Script Meta Documentation Search


Learn about how Denizen works in The Beginner's Guide.
Showing 508 search results for item out of 3939 meta-documentation entries...

Perfect Name Match Results



Mechanism


Nameitem
ObjectEntityTag
InputItemTag
Related Tags<EntityTag.item> (Property) An entity's item, which can be: (...)
Description(Property) An entity's item, which can be:
- the item represented and displayed by a dropped item.
- the item represented by a thrown trident.
- a throwable projectile's display item.
- an eye-of-ender's item, which is both displayed and dropped.
- a fireball's display item.
- an item display's display item.
- an ominous item spawner's display item.
Generated Example
- adjust <player> item:iron_sword
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityItem.java#L13

Tag


Name<item[<item>]>
ReturnsItemTag
DescriptionReturns an item object constructed from the input value.
Refer to ObjectType:ItemTag.
Generated Example
- give <item[<player.item_in_hand>]>
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/utilities/CommonRegistries.java#L238

Partial Name Match Results



Command


NameDisplayItem
Syntaxdisplayitem [<item>] [<location>] (duration:<value>)
Short DescriptionMakes a non-touchable item spawn for players to view.
Full DescriptionThis command drops an item at the specified location which cannot be picked up by players.

It accepts a duration which determines how long the item will stay for until disappearing.
If no duration is specified the item will stay for 1 minute, after which the item will disappear.
Use "duration:infinite" to indicate that the item should never remove itself.
Related Tags<EntityTag.item> (Property) An entity's item, which can be: (...)
<entry[saveName].dropped> returns a EntityTag of the spawned item.
Usage Example
# Use to display a stone block dropped at a players location.
- displayitem stone <player.location>
Usage Example
# Use to display a diamond sword dropped at a relevant location.
- displayitem diamond_sword <context.location>
Usage Example
# Use to display redstone dust dropped at a related location disappear after 10 seconds.
- displayitem redstone <context.location> duration:10s
Usage Example
# Use to save the dropped item to save entry 'item_dropped'.
- displayitem redstone <context.location> duration:10s save:item_dropped
Groupitem
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/item/DisplayItemCommand.java#L38
NameFakeItem
Syntaxfakeitem [<item>|...] [slot:<slot>] (duration:<duration>) (players:<player>|...) (raw)
Short DescriptionShow a fake item in a player's inventory.
Full DescriptionThis command allows you to display an item in an inventory that is not really there.

To make it automatically disappear at a specific time, use the 'duration:' argument.
Note that the reset can be unreliable, especially if the player changes their open inventory view. Consider using "- inventory update" after a delay instead.

By default, it will use any inventory the player currently has open.

Slots function as follows:
Player inventory is slots 1-36, same as normal inventory slot indices.
If the player has an open inventory, to apply the item to a slot in that inventory, add 36 to the slot index.
If the player does not have an open inventory, slots 36-40 are equipment, 41 is offhand, 42 is recipe result, 43-46 are recipe.

For modifying equipment, consider Mechanism:PlayerTag.fake_equipment instead.

The slot argument can be any valid slot, see Language:Slot Inputs.

Optionally specify 'raw' to indicate that the slow is a raw network slot ID.
Related TagsNone
Usage Example
# Use to show a clientside-only pumpkin on the player's head.
- fakeitem pumpkin slot:head
Groupitem
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/item/FakeItemCommand.java#L39
NameItemCooldown
Syntaxitemcooldown [<material>|...] (duration:<duration>)
Short DescriptionPlaces a cooldown on a material in a player's inventory.
Full DescriptionPlaces a cooldown on a material in a player's inventory.
Related Tags<PlayerTag.item_cooldown[<material>]> Returns the cooldown duration remaining on player's material.
Usage Example
# Places a 1 second cooldown on using an ender pearl.
- itemcooldown ender_pearl
Usage Example
# Places a 10 minute cooldown on using golden apples.
- itemcooldown golden_apple d:10m
Groupplayer
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/player/ItemCooldownCommand.java#L26

Event


Nameblock cooks|smelts item into item
Event Lines <block> cooks|smelts <item> (into <item>)
Triggerswhen an item is smelted/cooked by a block.
Generated Exampleson exposed_copper_trapdoor smelts item into item:
on light_gray_bed cooks reinforced_deepslate:
Contexts<context.location> returns the LocationTag of the block smelting/cooking.
<context.source_item> returns the ItemTag that is being smelted/cooked.
<context.result_item> returns the ItemTag that is the result of the smelting/cooking.
DetermineItemTag to set the item that is the result of the smelting/cooking.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupBlock
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/block/BlockCooksSmeltsItemScriptEvent.java#L13
Nameblock dispenses item
Event Lines <block> dispenses <item>
Triggerswhen a block dispenses a single item.
Generated Examplesafter block dispenses mule_spawn_egg:
on hopper dispenses item:
Contexts<context.location> returns the LocationTag of the dispenser.
<context.item> returns the ItemTag of the item being dispensed.
<context.velocity> returns a LocationTag vector of the velocity the item will be shot at.
DetermineLocationTag to set the velocity the item will be shot at.
"ITEM:<ItemTag>" to set the item being shot.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupBlock
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/block/BlockDispensesScriptEvent.java#L15
Nameblock tries to dispense item
Event Lines <block> tries to dispense <item>
Triggersbefore a block dispenses an item.
This event fires before the dispenser fully processes a drop, allowing access to the dispensing slot and cancellation of sound effects.
Generated Exampleson oak_fence tries to dispense item:
after block tries to dispense light_blue_dye:
Contexts<context.location> returns the LocationTag of the dispenser.
<context.item> returns the ItemTag of the item about to be dispensed.
<context.slot> returns a ElementTag(Number) of the slot that will be dispensed from.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupBlock
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/events/BlockPreDispenseScriptEvent.java#L14
Nameentity drops item
Event Lines <entity> drops <item>
Triggerswhen an entity drops an item.
Generated Examplesafter trident drops item:
after mob drops rose_bush:
Has PlayerWhen 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.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupEntity
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityDropsItemScriptEvent.java#L18
Nameentity picks up item
Event Lines <entity> picks up <item>
<entity> takes <item>
Triggerswhen an entity picks up an item.
Generated Examplesafter drowned picks up wither_skeleton_skull:
after entity takes pumpkin:
after npc picks up infested_chiseled_stone_bricks:
on entity takes diamond_hoe:
Has Playerwhen the entity picking up the item is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Has NPCwhen 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.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupPlayer
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityPicksUpItemScriptEvent.java#L20
Nameinventory picks up item
Event Lines <inventory> picks up <item>
Triggerswhen a hopper or hopper minecart picks up an item.
Generated Examplesafter merchant picks up wooden_pickaxe:
on inventory picks up cocoa_beans:
Contexts<context.inventory> returns the InventoryTag that picked up the item.
<context.item> returns the ItemTag.
<context.entity> returns a EntityTag of the item entity.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupItem
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/item/InventoryPicksUpItemScriptEvent.java#L14
Nameitem despawns
Event Lines <item> despawns
Triggerswhen an item entity despawns.
Generated Examplesafter brown_banner despawns:
on item despawns:
Contexts<context.item> returns the ItemTag of the entity.
<context.entity> returns the EntityTag.
<context.location> returns the location of the entity to be despawned.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupItem
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/item/ItemDespawnsScriptEvent.java#L14
Nameitem enchanted
Event Lines <item> enchanted
Triggerswhen an item is enchanted.
Generated Examplesafter purple_stained_glass_pane enchanted:
after item enchanted:
Has Playerwhen the enchanter is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Switchesenchant:<name> to only process the event if any of the enchantments being added match the given name.
Contexts<context.entity> returns the EntityTag of the enchanter (if applicable)
<context.location> returns the LocationTag of the enchanting table.
<context.inventory> returns the InventoryTag of the enchanting table.
<context.item> returns the ItemTag to be enchanted.
<context.button> returns which button was pressed to initiate the enchanting.
<context.cost> returns the experience level cost of the enchantment.
<context.enchants> returns a MapTag of enchantment names to the level that will be applied.
DetermineElementTag(Number) to set the experience level cost of the enchantment.
"RESULT:<ItemTag>" to change the item result (only affects metadata (like enchantments), not material/quantity/etc!).
"ENCHANTS:<MapTag>" to change the resultant enchantments.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupItem
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/item/ItemEnchantedScriptEvent.java#L22
Nameitem merges
Event Lines <item> merges
Triggerswhen an item entity merges into another item entity.
Generated Examplesafter item merges:
on tropical_fish merges:
Contexts<context.item> returns the ItemTag of the entity.
<context.entity> returns the EntityTag.
<context.target> returns the EntityTag being merged into.
<context.location> returns the location of the entity to be spawned.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupItem
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/item/ItemMergesScriptEvent.java#L15
Nameitem moves from inventory to inventory
Event Lines <item> moves from <inventory> (to <inventory>)
Triggerswhen an entity or block moves an item from one inventory to another. (Hopper-style movement, not player-induced movement).
Generated Exampleson hanging_roots moves from location to dropper:
after item moves from note:
Contexts<context.origin> returns the origin InventoryTag.
<context.destination> returns the destination InventoryTag.
<context.initiator> returns the InventoryTag that initiated the item's transfer.
<context.item> returns the ItemTag that was moved.
DetermineItemTag to set a different item to be moved.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupItem
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/item/ItemMoveScriptEvent.java#L13
Nameitem recipe formed
Event Lines <item> recipe formed
Triggerswhen an item's recipe is correctly formed.
Generated Examplesafter hoglin_spawn_egg recipe formed:
after item recipe formed:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Contexts<context.inventory> returns the InventoryTag of the crafting inventory.
<context.item> returns the ItemTag to be formed in the result slot.
<context.recipe> returns a ListTag of ItemTags in the recipe.
<context.recipe_id> returns the ID of the recipe that was formed.
<context.is_repair> returns an ElementTag(Boolean) of whether the event was triggered by a tool repair operation rather than a crafting recipe.
DetermineItemTag to change the item that is formed in the result slot.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
GroupItem
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/item/ItemRecipeFormedScriptEvent.java#L23
Nameitem spawns
Event Lines <item> spawns
Triggerswhen an item entity spawns.
Generated Examplesafter crimson_hanging_sign spawns:
after air spawns:
Contexts<context.item> returns the ItemTag of the entity.
<context.entity> returns the EntityTag.
<context.location> returns the location of the entity to be spawned.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupItem
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/item/ItemSpawnsScriptEvent.java#L15
Nameblock drops item from breaking
Event Lines block drops item from breaking
<block> drops <item> from breaking
Triggerswhen a items drop from a block due to a player breaking the block in survival mode.
Generated Examplesafter block drops item from breaking:
after soul_wall_torch drops item from breaking:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Contexts<context.location> returns the LocationTag the block was broken at.
<context.material> returns the MaterialTag of the block that was broken.
<context.drop_entities> returns a ListTag of EntityTags of type DROPPED_ITEM. To get the list of ItemTags, just tack ".parse[item]" onto this context tag.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupPlayer
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/BlockDropsItemScriptEvent.java#L19
Nameblock equips item
Event Lines block equips <item>
Triggerswhen armor is equipped to an entity by a dispenser.
Example
# Will cause leather armor to be dispensed like a normal item and not be equipped on an armor stand.
on block equips leather* on:armor_stand:
- determined cancelled
Example
# Will equip a golden helmet if a leather helmet is originally being equipped.
on block equips leather_helmet:
- determine item:golden_helmet
Has Playerwhen the equipped entity is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Has NPCwhen the equipped entity is an NPC.
Switcheson:<entity> to only process the event if the entity having the armor equipped matches the entity input.
Contexts<context.item> returns the ItemTag of the armor being dispensed.
<context.entity> returns the EntityTag of the entity having the armor equipped.
<context.location> returns the LocationTag of the dispenser.
Determine"ITEM:<ItemTag>" to set the item being dispensed.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupBlock
Warning(s)Determined armor types must match or armor will be assigned incorrect slots (for example, if the original item was a helmet but the new item is boots, the boots will be assigned to the helmet slot and will not display properly). If you determine a non-armor item, it will be dispensed normally.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/block/BlockEquipsItemScriptEvent.java#L16
Namebrewing stand fueled with item
Event Lines brewing stand fueled (with <item>)
Triggerswhen a brewing stand receives an item to use as fuel.
Generated Exampleson brewing stand fueled with item:
after brewing stand fueled with copper_trapdoor:
Contexts<context.location> returns the LocationTag of the brewing stand.
<context.item> returns the ItemTag being inserted as fuel.
<context.fuel_power> returns the fuel power level being added. Each unit of fuel can power one brewing operation.
<context.consuming> returns a boolean indicating whether the fuel item will be consumed.
Determine"FUEL_POWER:<ElementTag(Number)>" to set the fuel power level to be added.
"CONSUMING:<ElementTag(Boolean)>" to indicate whether the fuel item should be consumed.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupBlock
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/block/BrewingStandFueledScriptEvent.java#L15
Namecrafter crafts item
Event Lines crafter crafts <item>
Triggerswhen a crafter block crafts an item.
Generated Examplesafter crafter crafts string:
after crafter crafts andesite_wall:
Contexts<context.location> returns the LocationTag of the crafter block.
<context.item> returns the ItemTag being crafted.
<context.recipe_id> returns the ID of the recipe formed.
Determine"ITEM:<ItemTag>" to set the item being crafted. Determinations still consume ingredients.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupBlock
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/block/CrafterCraftsScriptEvent.java#L15
Nameentity shoots bow
Event Lines entity shoots bow
<entity> shoots <item>
Triggerswhen an entity shoots something out of a bow.
Generated Examplesafter entity shoots bow:
after living shoots mutton:
on entity shoots bow:
after entity shoots oxidized_copper_door:
Has Playerwhen the entity that shot the bow is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Has NPCwhen 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.
DetermineListTag(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.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupEntity
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityShootsBowScriptEvent.java#L27
Namefurnace burns item
Event Lines furnace burns <item>
Triggerswhen a furnace burns an item used as fuel.
Generated Examplesafter furnace burns armadillo_scute:
after furnace burns observer:
Contexts<context.location> returns the LocationTag of the furnace.
<context.item> returns the ItemTag burnt.
DetermineDurationTag to set the burn time for this fuel.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupBlock
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/block/FurnaceBurnsItemScriptEvent.java#L15
Namefurnace starts smelting item
Event Lines furnace starts smelting <item>
Triggerswhen a furnace starts smelting an item.
Generated Exampleson furnace starts smelting smooth_red_sandstone:
after furnace starts smelting birch_sign:
Contexts<context.location> returns a LocationTag of the furnace's location.
<context.item> returns an ItemTag of the item being smelted.
<context.recipe_id> returns an ElementTag of the recipe ID being used.
<context.total_cook_time> returns a DurationTag of the total time it will take to smelt the item.
DetermineDurationTag to set the total cook time for the item being smelted.
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupBlock
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/block/FurnaceStartsSmeltingScriptEvent.java#L15
Namelingering potion splash|splashes
Event Lines lingering potion splash|splashes
lingering <item> splash|splashes
Triggerswhen a lingering splash potion breaks open
Generated Exampleson lingering potion splash:
on lingering waxed_weathered_cut_copper splashes:
after lingering potion splashes:
after lingering item splashes:
Contexts<context.potion> returns an ItemTag of the potion that broke open.
<context.location> returns the LocationTag the splash potion broke open at.
<context.entity> returns an EntityTag of the splash potion.
<context.cloud> returns the EntityTag of the area of effect cloud.
<context.radius> returns the radius of the effect cloud.
<context.duration> returns the lingering duration of the effect cloud.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupWorld
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/world/LingeringPotionSplashScriptEvent.java#L16
Nameplayer click_type clicks item in inventory
Event Lines player (<click_type>) clicks (<item>) in <inventory>
Triggerswhen a player clicks in an inventory. Note that you likely will also want to listen to Event:player drags in inventory.
Generated Examplesafter player click_type clicks wooden_axe in inventory:
after player clicks in cartography:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Switcheswith:<item> to only process the event if a specified cursor item was used.
in_area:<area> replaces the default 'in:<area>' for this event.
action:<action> to only process the event if a specified action occurred.
slot:<slot> to only process the event if a specified slot or slot_type was clicked. For slot input options, see Language:Slot Inputs.
Contexts<context.item> returns the ItemTag the player has clicked on.
<context.inventory> returns the InventoryTag (the 'top' inventory, regardless of which slot was clicked).
<context.clicked_inventory> returns the InventoryTag that was clicked in.
<context.cursor_item> returns the item the Player is clicking with.
<context.click> returns an ElementTag with the name of the click type. Click type list: 🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/ClickType.html
<context.slot_type> returns an ElementTag with the name of the slot type that was clicked. Slot type list: 🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/InventoryType.SlotType.html
<context.slot> returns an ElementTag with the number of the slot that was clicked.
<context.raw_slot> returns an ElementTag with the raw number of the slot that was clicked.
<context.is_shift_click> returns true if 'shift' was used while clicking.
<context.action> returns the inventory_action. See Language:Inventory Actions.
<context.hotbar_button> returns an ElementTag of the button pressed as a number, or 0 if no number button was pressed.
DetermineItemTag to set the current item for the event.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupPlayer
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerClicksInInventoryScriptEvent.java#L70
Nameplayer breaks held item
Event Lines player breaks held item
player breaks held <item>
Triggerswhen a player breaks the item they are holding.
Generated Examplesafter player breaks held item:
after player breaks held infested_cracked_stone_bricks:
on player breaks held item:
after player breaks held oxidized_copper_grate:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Contexts<context.item> returns the item that broke.
<context.slot> returns the slot of the item that broke.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupPlayer
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerBreaksItemScriptEvent.java#L21
Nameplayer changes armor stand item
Event Lines player changes armor stand item
Triggerswhen a player modifies an armor stand entity.
Generated Examplesafter player changes armor stand item:
on player changes armor stand item:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Switchesfrom:<item> to only process the event if the item on the armor stand being interacted with matches the specified item matcher.
hand:<hand> to only process the event if the player is using a specific hand to interact with the armor stand. Available only on MC versions 1.19+.
to:<item> to only process the event if the item held by the player matches the specified item matcher.
slot:<slot> to only process the event if the armor stand's item slot that was interacted with is the specified slot.
armor_stand:<entity> to only process the event if the armor stand being interacted with matches the specified entity matcher.
Contexts<context.armor_stand_item> returns the ItemTag being interacted with on the armor stand.
<context.entity> returns an EntityTag of the armor stand.
<context.hand> returns an ElementTag of the hand used by the player to interact with the armor stand, can be either HAND or OFF_HAND. Available only on MC versions 1.19+.
<context.player_item> returns the ItemTag held by the player.
<context.slot> returns an ElementTag of the armor stand's item slot that was interacted with. Valid equipment slot values can be found at 🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/EquipmentSlot.html.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupPlayer
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerArmorStandManipulateScriptEvent.java#L18
Nameplayer changes framed item
Event Lines player changes framed <item>
Triggerswhen a player interacts with an item frame by adding, removing, or rotating the item held in it.
Generated Examplesafter player changes framed rooted_dirt:
after player changes framed light_blue_banner:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Switchesframe:<entity> to only process the event if the item frame entity being matches the input.
action:<action> to only process the event if the change matches the input.
Contexts<context.frame> returns the EntityTag of the item frame.
<context.item> returns the ItemTag of the item held in the item frame.
<context.action> returns the ElementTag of the action being performed, based on 🔗https://jd.papermc.io/paper/1.20/io/papermc/paper/event/player/PlayerItemFrameChangeEvent.ItemFrameChangeAction.html
Determine"ITEM:<ItemTag>" to change the item held by the item frame. If there is an item already in the frame, it will be replaced. To remove the item, set it to air.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupPaper
RequiresPaper
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/events/PlayerChangesFramedItemScriptEvent.java#L16
Nameplayer consumes item
Event Lines player consumes item
player consumes <item>
Triggerswhen a player consumes (eats/drinks) an item (like food or potions).
Generated Exampleson player consumes item:
after player consumes item:
after player consumes red_banner:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Contexts<context.item> returns the ItemTag.
<context.hand> returns an ElementTag of the hand being used to consume the item. Can be either HAND or OFF_HAND. Requires a 1.19+ server.
DetermineItemTag to change the item being consumed. Use with caution, if the player is eating a stack of items, this will replace the entire stack.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupPlayer
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerConsumesScriptEvent.java#L21
Nameplayer crafts item
Event Lines player crafts item
player crafts <item>
Triggerswhen a player fully crafts an item.
Generated Examplesafter player crafts item:
on player crafts item:
on player crafts dead_horn_coral_block:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Contexts<context.inventory> returns the InventoryTag of the crafting inventory.
<context.item> returns the ItemTag to be crafted.
<context.amount> returns the amount of the item that will be crafted (usually 1, except when shift clicked. Can be above 64).
<context.recipe> returns a ListTag of ItemTags in the recipe.
<context.recipe_id> returns the ID of the recipe that is being crafted.
<context.click_type> returns an ElementTag with the name of the click type. Click type list: 🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/ClickType.html
DetermineItemTag to change the item that is crafted.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
GroupPlayer
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerCraftsItemScriptEvent.java#L25
Nameplayer drags in inventory
Event Lines player drags in inventory
player drags (<item>) (in <inventory>)
Triggerswhen a player drags in an inventory (that is, clicks and then holds the mouse button down while moving the mouse across multiple slots).
Generated Examplesafter player drags in inventory:
after player drags item:
on player drags in inventory:
on player drags ward_armor_trim_smithing_template in dropper:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Switchesin_area:<area> replaces the default 'in:<area>' for this event.
drag_type:<type> to only run the event if the given drag type (SINGLE or EVEN) was used.
Contexts<context.item> returns the ItemTag the player has dragged.
<context.inventory> returns the InventoryTag (the 'top' inventory, regardless of which slot was clicked).
<context.clicked_inventory> returns the InventoryTag that was clicked in.
<context.slots> returns a ListTag of the slot numbers dragged through.
<context.raw_slots> returns a ListTag of the raw slot numbers dragged through.
<context.drag_type> returns either SINGLE or EVEN depending on whether the player used their left or right mouse button.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupPlayer
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerDragsInInvScriptEvent.java#L25
Nameplayer empties bucket
Event Lines player empties bucket
player empties <item>
Triggerswhen a player empties a bucket.
Generated Examplesafter player empties bucket:
after player empties music_disc_cat:
after player empties item:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Contexts<context.item> returns the ItemTag of the bucket being emptied (just material, other properties are lost - use 'player.item_in_hand' if you need full data).
<context.location> returns the LocationTag of the block clicked with the bucket.
<context.relative> returns the LocationTag of the block in front of the clicked block.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupPlayer
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerEmptiesBucketScriptEvent.java#L17
Nameplayer equips|unequips armor|helmet|chestplate|leggings|boots
Event Lines player equips|unequips armor|helmet|chestplate|leggings|boots
player equips|unequips <item>
Triggerswhen a player (un)equips armor.
Generated Examplesafter player unequips leggings:
on player unequips item:
on player equips chestplate:
after player unequips light_gray_concrete_powder:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Contexts<context.new_item> returns the ItemTag that is now in the slot.
<context.old_item> returns the ItemTag that used to be in the slot.
<context.slot> returns the name of the slot.
GroupPaper
RequiresPaper
Warning(s)This event is not reliable, and may miss some types of equipment changes or fire when equipment hasn't actually changed.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/events/PlayerEquipsArmorScriptEvent.java#L22
Nameplayer fills bucket
Event Lines player fills bucket
player fills <item>
Triggerswhen a player fills a bucket.
Generated Examplesafter player fills bucket:
after player fills prismarine_crystals:
after player fills item:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Contexts<context.item> returns the ItemTag of the filled bucket.
<context.location> returns the LocationTag of the block clicked with the bucket.
<context.material> returns the MaterialTag of the LocationTag.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupPlayer
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerFillsBucketScriptEvent.java#L17
Nameplayer fishes entity while state
Event Lines player fishes (<entity>) (while <state>)
player fishes (<item>) (while <state>)
Triggerswhen a player uses a fishing rod.
Generated Examplesafter player fishes:
after player fishes oak_pressure_plate while state:
on player fishes while state:
Has PlayerIf 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 NPCIf the fisher or the caught entity is an NPC.
Switcheswith:<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.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupPlayer
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerFishesScriptEvent.java#L21
Nameplayer item takes damage
Event Lines player item takes damage
player <item> takes damage
Triggerswhen the player damages an item.
Generated Examplesafter player item takes damage:
after player end_stone takes damage:
on player item takes damage:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Contexts<context.damage> returns the amount of damage the item has taken.
<context.original_damage> returns the original amount of damage the item would have taken, before any modifications such as the unbreaking enchantment (only on Paper).
<context.item> returns the item that has taken damage.
<context.slot> returns the slot of the item that has taken damage. This value is a bit of a hack and is not reliable.
DetermineElementTag(Number) to set the amount of damage the item will take.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
Synonyms (Search Aid)item durability changes
GroupPlayer
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerItemTakesDamageScriptEvent.java#L20
Nameplayer mends item
Event Lines player mends item
player mends <item>
Triggerswhen an XP orb is used to repair an item with the Mending enchantment in the player's inventory.
Generated Examplesafter player mends item:
after player mends chiseled_polished_blackstone:
on player mends item:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Contexts<context.item> returns the item that is repaired.
<context.repair_amount> returns how much durability the item recovers.
<context.xp_orb> returns the XP orb that triggered the event.
<context.slot> returns the slot of the item that has been repaired. This value is a bit of a hack and is not reliable.
DetermineElementTag(Number) to set the amount of durability the item recovers.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupPlayer
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerMendsItemScriptEvent.java#L18
Nameplayer places block
Event Lines player places block
player places <item>
Triggerswhen a player places a block.
Example
on player places block:
Example
after player places torch using:off_hand:
Example
on player places cactus against:sand:
Example
# This example process the event only if the player places any block that isn't tnt.
on player places block type:!tnt:
- announce "<player.name> has placed a block that isn't TNT. Lucky!"
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Switchesusing:<hand_type> to only process the event if the player is using the specified hand type (HAND or OFF_HAND).
against:<location> to only process the event if block that this new block is being placed against matches the specified LocationTag matcher.
type:<material> to only process the event if the block placed matches the MaterialTag matcher input.
Contexts<context.location> returns the LocationTag of the block that was placed.
<context.material> returns the MaterialTag of the block that was placed.
<context.old_material> returns the MaterialTag of the block that was replaced.
<context.item_in_hand> returns the ItemTag of the item in hand.
<context.hand> returns the name of the hand that the block was in (HAND or OFF_HAND).
<context.against> returns the LocationTag of the block this block was placed against.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupPlayer
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerPlacesBlockScriptEvent.java#L18
Nameplayer prepares anvil craft item
Event Lines player prepares anvil craft item
player prepares anvil craft <item>
Triggerswhen a player prepares an anvil to craft an item.
Generated Exampleson player prepares anvil craft item:
on player prepares anvil craft iron_bars:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Contexts<context.inventory> returns the InventoryTag of the anvil inventory.
<context.item> returns the ItemTag to be crafted.
<context.repair_cost> returns an ElementTag(Number) of the repair cost.
<context.new_name> returns an ElementTag of the new name.
DetermineElementTag(Number) to set the repair cost.
ItemTag to change the item that is crafted.
GroupPlayer
Warning(s)The player doing the crafting is estimated and may be inaccurate.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerPreparesAnvilCraftScriptEvent.java#L19
Nameplayer prepares grindstone craft item
Event Lines player prepares grindstone craft <item>
Triggerswhen a player prepares to grind an item.
Example
# This example removes the usually not removable curse of binding enchantment.
on player prepares grindstone craft item:
- determine result:<context.result.with[remove_enchantments=binding_curse]>
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Contexts<context.inventory> returns the InventoryTag of the grindstone inventory.
<context.result> returns the ItemTag to be crafted.
Determine"RESULT:<ItemTag>" to change the item that is crafted.
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupPlayer
RequiresPaper
Warning(s)The player doing the grinding is estimated and may be inaccurate.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/events/PlayerPreparesGrindstoneCraftScriptEvent.java#L16
Nameplayer prepares item enchant
Event Lines player prepares item enchant
player prepares <item> enchant
Triggerswhen a player prepares to enchant an item.
Generated Examplesafter player prepares item enchant:
after player prepares light_gray_terracotta enchant:
on player prepares item enchant:
after player prepares spruce_hanging_sign enchant:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Contexts<context.location> returns the LocationTag of the enchanting block.
<context.item> returns the ItemTag to be enchanted.
<context.bonus> returns an ElementTag(Number) of the enchanting bonus available (number of bookshelves).
<context.offers> returns a ListTag of the available enchanting offers, each as a MapTag with keys 'cost', 'enchantment_type', and 'level'.
Determine"OFFERS:<ListTag>" of MapTags to set the offers available. Cannot be a different size list than the size of context.offers.
GroupPlayer
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerPreparesEnchantScriptEvent.java#L20
Nameplayer prepares smithing item
Event Lines player prepares smithing item
player prepares smithing <item>
Triggerswhen a player prepares to upgrade an item on a smithing table.
Generated Exampleson player prepares smithing item:
after player prepares smithing item:
after player prepares smithing tuff_brick_slab:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Contexts<context.inventory> returns the InventoryTag of the smithing table inventory.
<context.item> returns the ItemTag after upgrading.
DetermineItemTag to change the item that results from the upgrade.
GroupPlayer
Warning(s)The player doing the smithing is estimated and may be inaccurate.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerPreparesSmithingTableScriptEvent.java#L18
Nameplayer raises|lowers|toggles item
Event Lines player raises|lowers|toggles <item>
Triggerswhen a player starts or stops holding up an item, such as a shield, spyglass, or crossbow.
Generated Exampleson player toggles hopper:
after player raises yellow_bed:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Switchesreason:<reason> to only process the event if the reason matches the input.
Contexts<context.state> returns an ElementTag(Boolean) of whether the player raised or lowered the item.
<context.held_for> returns a DurationTag of how long the player held the item up for (only on Paper).
<context.hand> returns an ElementTag of the hand that the player is raising or lowering (only on Paper).
<context.item> returns an ItemTag of the item that the player is raising or lowering (only on Paper).
<context.reason> returns the reason for a state change. Can be: raise, lower, swap, hold, drop, quit, death.
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
Synonyms (Search Aid)player raises shield, player raises spyglass
GroupPlayer
Warning(s)For 'lowers', the item may be tracked incorrectly. Prefer 'player lowers item' (the generic item form) for a 'lowers' event (similar for 'toggles').
Also be aware this event may misfire in some cases.
This event and its data are more accurate on Paper servers.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerRaiseLowerItemScriptEvent.java#L28
Nameplayer scrolls their hotbar
Event Lines player scrolls their hotbar
player holds item
Triggerswhen a player scrolls through their hotbar.
Generated Examplesafter player scrolls their hotbar:
after player holds item:
on player scrolls their hotbar:
on player holds item:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Switchesitem:<item> to only process the event when the player is going to hold a specified item.
Contexts<context.new_slot> returns the number of the new inventory slot.
<context.previous_slot> returns the number of the old inventory slot.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupPlayer
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/HotbarScrollScriptEvent.java#L15
Nameplayer smiths item
Event Lines player smiths item
player smiths <item>
Triggerswhen a player upgrades an item on a smithing table.
Generated Exampleson player smiths item:
on player smiths light_gray_shulker_box:
after player smiths item:
after player smiths waxed_weathered_copper_grate:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Contexts<context.inventory> returns the InventoryTag of the smithing table inventory.
<context.item> returns the ItemTag after upgrading.
DetermineItemTag to change the item that results from the upgrade.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
GroupPlayer
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerSmithsItemScriptEvent.java#L19
Nameplayer swaps items
Event Lines player swaps items
Triggerswhen a player swaps the items in their main and off hands.
Generated Examplesafter player swaps items:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Switchesmain:<item> to only process the event if the item being put into the main hand matches the input item.
offhand:<item> to only process the event if the item being put into the off-hand matches the input item.
Contexts<context.main> returns the ItemTag switched to the main hand.
<context.offhand> returns the ItemTag switched to the off hand.
Determine"MAIN:<ItemTag>" to set the item in the main hand.
"OFFHAND:<ItemTag>" to set the item in the off hand.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
GroupPlayer
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerSwapsItemsScriptEvent.java#L17
Nameplayer takes item from furnace
Event Lines player takes item from furnace
player takes <item> from furnace
Triggerswhen a player takes an item from a furnace.
Generated Examplesafter player takes item from furnace:
on player takes tube_coral_fan from furnace:
after player takes black_concrete from furnace:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Contexts<context.location> returns the LocationTag of the furnace.
<context.item> returns the ItemTag taken out of the furnace.
DetermineElementTag(Number) to set the amount of experience the player will get.
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupPlayer
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerTakesFromFurnaceScriptEvent.java#L17
Nameplayer takes item from lectern
Event Lines player takes item from lectern
player takes <item> from lectern
Triggerswhen a player takes a book from a lectern.
Generated Examplesafter player takes item from lectern:
on player takes item from lectern:
on player takes ocelot_spawn_egg from lectern:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Contexts<context.location> returns the LocationTag of the lectern.
<context.item> returns the book ItemTag taken out of the lectern.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupPlayer
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerTakesFromLecternScriptEvent.java#L17
Namepotion splash|splashes
Event Lines potion splash|splashes
<item> splash|splashes
Triggerswhen a splash potion breaks open.
Example
# This example sets the intensity of the first affected entity to 0.6.
on potion splashes:
- if <context.entities.any>:
     - determine INTENSITY:[entity=<context.entities.first>;intensity=0.6]
Contexts<context.potion> returns an ItemTag of the potion that broke open.
<context.entities> returns a ListTag of affected entities.
<context.location> returns the LocationTag the splash potion broke open at.
<context.entity> returns an EntityTag of the splash potion.
<context.intensity> returns an ListTag(MapTag) of the intensity for all affected entities.
DetermineINTENSITY:<ListTag(MapTag)>" to set the intensity of specified entities.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupWorld
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/world/PotionSplashScriptEvent.java#L25
Namevault displays item
Event Lines vault displays <item>
Triggerswhen a vault block displays an item.
Generated Examplesafter vault displays chiseled_sandstone:
after vault displays red_mushroom:
Contexts<context.location> returns the LocationTag of the vault block.
<context.item> returns the ItemTag being displayed.
Determine"ITEM:<ItemTag>" to set the item being displayed.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupBlock
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/block/VaultDisplaysItemScriptEvent.java#L13

Language


NameItem Components
DescriptionMinecraft item components (see 🔗https://minecraft.wiki/w/Data_component_format) are managed as follows:
Each item type has a default set of component values; a food item will have food components by default, a tool item will have tool components by default, etc.
Different items can override their type's default components, either by setting values that weren't there previously (e.g. making an inedible item edible), or by removing values that are there by default (e.g. making a shield item that can't block).
Items' overrides can later be reset, making them use their type's default values again.

In Denizen, different item components are represented by item properties.
These properties allow both setting a component override on an item, and clearing/resetting it by providing no input.
Item properties' name will generally match their respective item component's name, but not always!
Due to this, features that take item component names as input (such as Tag:ItemTag.is_overridden) accept both Minecraft component names and Denizen property names.

Here is an example of applying all of this in a script:

# We define a default apple item
- define apple <item[apple]>
# We remove the apple's "food" component, making eating it restore no food points (it is still consumable due to the "consumable" component).
- adjust def:apple remove_component:food
# This check will pass, as the apple's "food" component is overridden to have no value.
- if <[apple].is_overridden[food]>:
  - narrate "The apple has a modified food component! It will behave differently to a normal apple."
# We reset the apple item's food component by adjusting with no value, making it a normal apple.
- adjust def:apple food:
GroupMinecraft Logic
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/datacomponents/DataComponentAdapter.java#L25
NameItem Script Containers
DescriptionItem script containers are an easy way to pre-define custom items for use within scripts. Item
scripts work with the ItemTag object, and can be fetched with the Object Fetcher by using the
ItemTag constructor ItemTag_script_name. Example: - drop <player.location> super_dooper_diamond

The following is the format for the container. Except for the 'material' key (and the dScript
required 'type' key), all other keys are optional.


# The name of the item script is the same name that you can use to construct a new
# ItemTag based on this item script. For example, an item script named 'sword_of_swiftness'
# can be referred to as simply 'sword_of_swiftness'.
Item_Script_Name:

    type: item

    # Must be a valid ItemTag. See 'ItemTag' for more information.
    # | All item scripts MUST have this key!
    material: base_material

    # List any mechanisms you want to apply to the item within
    # | Some item scripts should have this key!
    mechanisms:
      # An example of a mechanism to apply
      unbreakable: true
      # Other common example
      custom_model_data: 5
      # This demonstrates how to add a custom attribute modifier.
      attribute_modifiers:
          # One subkey for each attribute you want to modify.
          # Valid attribute names are listed at https://hub.spigotmc.org/javadocs/spigot/org/bukkit/attribute/Attribute.html
          generic_armor:
              # Each attribute can have a list of modifiers, using numbered keys. They will be applied in numeric order, low to high.
              1:
                  # Each modifier requires keys 'operation' and 'amount', and can optionally have keys 'name', 'slot', and 'id'.
                  # Operations can be: ADD_NUMBER, ADD_SCALAR, and MULTIPLY_SCALAR_1
                  operation: add_number
                  amount: 5
                  # Slots can be: HAND, OFF_HAND, FEET, LEGS, CHEST, HEAD, ANY
                  slot: head
                  # ID is a UUID used to uniquely identify modifiers. If unspecified the ID will be randomly generated.
                  # Items with modifiers that lack IDs cannot be stacked due to the random generation.
                  id: 10000000-1000-1000-1000-100000000000

    # The 'custom name' can be anything you wish. Use color tags to make colored custom names.
    # | Some item scripts should have this key!
    display name: custom name

    # Lore lines can make items extra unique. This is a list, so multiple entries will result in multiple lores.
    # If using a replaceable tag, they are filled in when the item script is given/created/dropped/etc.
    # | Some item scripts should have this key!
    lore:
    - item
    - ...

    # If you want an item to be damaged on creation, you can change its durability.
    # | Most item scripts should exclude this key!
    durability: 12

    # Each line must specify a valid enchantment name.
    # | Some item scripts should have this key!
    enchantments:
    - enchantment_name:level
    - ...

    # Set this to 'true' to allow the item script item to be used in material-based recipe (eg most vanilla recipes).
    # Defaults to false if unspecified.
    # | Most item scripts should exclude this key!
    allow in material recipes: false

    # You can specify flags to be added to the item.
    flags:
      # Each line within the flags section should be a flag name as a key, and the flag value as the value.
      # You can use lists or maps here the way you would expect them to work.
      my_flag: my value

    # You can optionally add crafting recipes for your item script.
    # Note that recipes won't show in the recipe book when you add a new item script, until you either reconnect or use the "resend_recipes" mechanism.
    # | Most item scripts should exclude this key, unless you're specifically building craftable items.
    recipes:
        1:
            # The type can be: shaped, shapeless, stonecutting, furnace, blast, smoker, campfire, or smithing.
            # | All recipes must include this key!
            type: shaped
            # The recipe can optionally have a custom internal recipe ID (for recipe books).
            # If not specified, will be of the form "<type>_<script.name>_<id>" where ID is the recipe list index (starting at 1, counting up).
            # IDs will always have the namespace "denizen". So, for the below, the full ID is "denizen:my_custom_item_id"
            # Note that most users should not set a custom ID. If you choose to set a custom one, be careful to avoid duplicates or invalid text.
            # Note that the internal rules for Recipe IDs are very strict (limited to "a-z", "0-9", "/", ".", "_", or "-").
            # | Most recipes should exclude this key.
            recipe_id: my_custom_item_id
            # You can optionally add a group as well. If unspecified, the item will have no group.
            # Groups are used to merge together similar recipes in the recipe book (in particular, multiple recipes for one item).
            # | Most recipes should exclude this key.
            group: my_custom_group
            # You can optionally specify the quantity to output. The default is 1 (or whatever the item script's quantity is).
            # | Only some recipes should have this key.
            output_quantity: 4
            # You must specify the input for the recipe. The below is a sample of a 3x3 shaped recipe. Other recipe types have a different format.
            # You are allowed to have non-3x3 shapes (can be any value 1-3 x 1-3, so for example 1x3, 2x1, and 2x2 are fine).
            # For an empty slot, use "air".
            # By default, items require an exact match. For a material-based match, use the format "material:MaterialNameHere" like "material:stick".
            # To make multiple different items match for any slot, just separate them with slashes, like "stick/stone".
            # To match multiple materials, use "material:a/b/c".
            # You can also make a dynamic matcher using '*', like "material:*_log" to match any log block,
            # or 'test_*' to match any item script that has name starting with 'test_'.
            # Note that to require multiple of an item as an input, the only option is to use multiple slots.
            # A single slot cannot require a quantity of items, as that is not part of the minecraft recipe system.
            # | All recipes must include this key!
            input:
            - ItemTag|ItemTag|ItemTag
            - ItemTag|ItemTag|ItemTag
            - ItemTag|ItemTag|ItemTag
       # You can add as many as you want.
       2:
            # Sample of the format for a 2x2 recipe
            type: shaped
            input:
            - ItemTag|ItemTag
            - ItemTag|ItemTag
       3:
           # Shapeless recipes take a list of input items.
           type: shapeless
           # Optionally specify the shapeless category for shapeless recipes, as "building", "redstone", "equipment", or "misc". Defaults to "misc" if unspecified.
           # | Only some recipes should have this key.
           category: misc
           input: ItemTag|...
       4:
           # Stonecutting recipes take exactly one input item.
           type: stonecutting
           input: ItemTag
       5:
           # Furnace, blast, smoker, and campfire recipes take one input and have additional options.
           type: furnace
           # Optionally specify the cook time as a duration (default 2s).
           # | Only some recipes should have this key.
           cook_time: 1s
           # Optionally specify the cooking category for cooking recipes, as "food", "blocks", or "misc". Defaults to "misc" if unspecified.
           # | Only some recipes should have this key.
           category: misc
           # Optionally specify experience reward amount (default 0).
           # | Only some recipes should have this key.
           experience: 5
           input: ItemTag
       6:
           # Smithing recipes take one base item and one upgrade item.
           # In versions 1.20 and up, smithing recipes take one template item, one base item, and one upgrade item.
           type: smithing
           template: ItemTag
           base: ItemTag
           # Optionally, choose what values to retain, as a simple pipe-separated list of parts to retain.
           # If unspecified, no values will be retained.
           # Parts can be: 'display', 'enchantments'
           retain: display|enchantments
           upgrade: ItemTag

       7:
           # Brewing recipes take one base item and one ingredient item.
           # | Brewing recipes are only available on Paper versions 1.18 and up.
           # | Brewing recipes also have a special input option on 1.20 and above: "matcher:<item matcher>", to allow advanced matchers on the input/ingredient items.
           type: brewing
           input: ItemTag
           ingredient: ItemTag

    # Set to true to not store the scriptID on the item, treating it as an item dropped by any other plugin.
    # NOTE: THIS IS NOT RECOMMENDED UNLESS YOU HAVE A SPECIFIC REASON TO USE IT.
    # | Most item scripts should exclude this key!
    no_id: true/false

    # If your material is a 'written_book', you can specify a book script to automatically scribe your item
    # upon creation. See 'book script containers' for more information.
    # | Most item scripts should exclude this key, though there are certain rare cases it may be useful to.
    book: book_script_name
GroupScript Container System
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/containers/core/ItemScriptContainer.java#L30

Mechanism


Namecan_pickup_items
ObjectEntityTag
InputElementTag(Boolean)
Related Tags<EntityTag.can_pickup_items> Returns whether the entity can pick up items.
DescriptionSets whether the entity can pick up items.
The entity must be living.
Generated Example
- adjust <player> can_pickup_items:false
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EntityTag.java#L3497
Namedamage_item
ObjectEntityTag
InputMapTag
DescriptionDamages the given equipment slot for the given amount.
This runs all vanilla logic associated with damaging an item like gamemode and enchantment checks, events, stat changes, advancement triggers, and notifying clients to play break animations.
Input is a map with "slot" as a valid equipment slot, and "amount" as the damage amount to be dealt.
Valid equipment slot values can be found at 🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/EquipmentSlot.html.
Example
# Damages your precious boots! :(
- adjust <player> damage_item:[slot=feet;amount=45]
Grouppaper
RequiresPaper
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/properties/PaperEntityExtensions.java#L160
Namedrops_item
ObjectEntityTag
InputElementTag(Boolean)
Related Tags<EntityTag.drops_item> (Property) Whether an eye of ender drops an item when breaking or shatters. (...)
Description(Property) Whether an eye of ender drops an item when breaking or shatters.
See Property:EntityTag.item for controlling an eye's item.
Generated Example
- adjust <player> drops_item:false
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityDropsItem.java#L10
Namefallingblock_drop_item
ObjectEntityTag
InputElementTag(Boolean)
DescriptionSets whether the falling block will drop an item if broken.
Generated Example
- adjust <player> fallingblock_drop_item:true
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EntityTag.java#L3524
Namefirework_item
ObjectEntityTag
InputItemTag
Related Tags<EntityTag.firework_item> If the entity is a firework, returns the firework item used to launch it.
DescriptionChanges the firework effect on this entity, using a firework item.
Generated Example
- adjust <player> firework_item:iron_sword
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityFirework.java#L82
Nameitem_in_hand
ObjectEntityTag
InputItemTag
Related Tags<EntityTag.item_in_hand> Returns the item the entity is holding, or air if none.
DescriptionSets the item in the entity's hand.
The entity must be living.
Generated Example
- adjust <player> item_in_hand:<player.item_in_hand>
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityItemInHand.java#L90
Nameitem_in_offhand
ObjectEntityTag
InputItemTag
Related Tags<EntityTag.item_in_offhand> Returns the item the entity is holding in their off hand, or air if none.
DescriptionSets the item in the entity's offhand.
The entity must be living.
Generated Example
- adjust <player> item_in_offhand:iron_sword
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityItemInOffHand.java#L90
Nameadd_attribute_modifiers
ObjectItemTag
InputMapTag
Related Tags<ItemTag.attribute_modifiers> (Property) Returns the attribute modifiers of an item, with key as the attribute name and value as a list of modifiers, (...)
DescriptionAdds attribute modifiers to an item without altering existing modifiers.
For input format details, refer to Language:attribute modifiers.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemAttributeModifiers.java#L122
Nameadd_charged_projectile
ObjectItemTag
InputItemTag
Related Tags<ItemTag.charged_projectiles> Returns a list of charged projectile items on this crossbow.
<ItemTag.is_charged> Returns whether this crossbow is charged.
DescriptionAdds a new charged projectile item on this crossbow. Charged projectiles may only be arrows and fireworks.
Generated Example
- adjust <player.item_in_hand> add_charged_projectile:iron_sword
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemChargedProjectile.java#L130
Namearmor_pose
ObjectItemTag
InputMapTag
Related Tags<ItemTag.armor_pose> (Property) Returns the pose of this armor stand item. (...)
Description(Property) Sets the pose of this armor stand item.
Allowed keys: head, body, left_arm, right_arm, left_leg, right_leg
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemArmorPose.java#L22
Namearmor_stand_data
ObjectItemTag
InputMapTag
Related Tags<ItemTag.armor_stand_data> Returns a map of basic armor stand data, with keys matching EntityTag property names. (...)
DescriptionSets a map of basic armor stand data, with keys matching EntityTag property names.
Allowed keys: base_plate, visible, marker, is_small, arms
Groupproperties
RequiresPaper
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/properties/ItemArmorStand.java#L85
Nameattribute_modifiers
ObjectItemTag
InputMapTag
Related Tags<ItemTag.attribute_modifiers> (Property) Returns the attribute modifiers of an item, with key as the attribute name and value as a list of modifiers, (...)
Description(Property) Sets the attribute modifiers of an item, with key as the attribute name and value as a list of modifiers,
where each modifier is a MapTag containing keys 'name', 'amount', 'slot', 'operation', and 'id'.
For use as a mechanism, this is a SET operation, meaning pre-existing modifiers are removed.
For format details, refer to Language:attribute modifiers.
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemAttributeModifiers.java#L30
Namebase_color
ObjectItemTag
InputElementTag
Related Tags<ItemTag.base_color> (Property) Returns the base color of a shield. (...)
Description(Property) Sets the base color of a shield.
For the list of possible colors, see 🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/DyeColor.html.
Give no input with a shield to remove the base color (and any patterns).
Tag returns null if there is no base color or patterns.
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemBaseColor.java#L12
Nameblock_material
ObjectItemTag
InputMaterialTag
Related Tags<ItemTag.block_material> Returns the material for an item with complex-block-data attached.
DescriptionAttaches complex-block-data from a material to an item.
Generated Example
- adjust <player.item_in_hand> block_material:iron_sword
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemBlockMaterial.java#L84
Namebook
ObjectItemTag
InputMapTag
Related Tags<ItemTag.is_book> Returns whether the item is considered an editable book. (...)
<ItemTag.book_title> Returns the title of the book.
<ItemTag.book_author> Returns the author of the book.
<ItemTag.book_pages> Returns the plain-text pages of the book as a ListTag.
DescriptionChanges the information on a book item.
Can have keys "pages" (a ListTag), "title", and "author", all optional.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemBook.java#L206
Namebook_author
ObjectItemTag
InputElementTag
Related Tags<ItemTag.book_author> Returns the author of the book.
DescriptionChanges the author of a book item.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemBook.java#L168
Namebook_generation
ObjectItemTag
InputListTag
Related Tags<ItemTag.book_generation> Returns the generation of the book (if any), as ORIGINAL, COPY_OF_ORIGINAL, COPY_OF_COPY, or TATTERED.
DescriptionSets the generation of the book (if any), as ORIGINAL, COPY_OF_ORIGINAL, COPY_OF_COPY, or TATTERED.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemBookGeneration.java#L84
Namebook_pages
ObjectItemTag
InputListTag
Related Tags<ItemTag.book_pages> Returns the plain-text pages of the book as a ListTag.
DescriptionChanges the plain-text pages of a book item.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemBook.java#L149
Namebook_title
ObjectItemTag
InputElementTag
Related Tags<ItemTag.book_title> Returns the title of the book.
DescriptionChanges the title of a book item.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemBook.java#L187
Namecan_destroy
ObjectItemTag
InputListTag(MaterialTag)
Related Tags<ItemTag.can_destroy> Returns a list of materials this item can destroy while in adventure mode, if any.
DescriptionSets the materials this item can destroy while in adventure mode.
Leave empty to remove this property.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemCanDestroy.java#L99
Namecan_place_on
ObjectItemTag
InputListTag(MaterialTag)
Related Tags<ItemTag.can_place_on> Returns a list of materials this item can be placed on while in adventure mode, if any.
DescriptionSets the materials this item can be placed on while in adventure mode.
Leave empty to remove this property.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemCanPlaceOn.java#L99
Namecharged_projectiles
ObjectItemTag
InputListTag(ItemTag)
Related Tags<ItemTag.charged_projectiles> Returns a list of charged projectile items on this crossbow.
<ItemTag.is_charged> Returns whether this crossbow is charged.
DescriptionSets the charged projectile items on this crossbow. Charged projectiles may only be arrows and fireworks.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemChargedProjectile.java#L106
Namecolor
ObjectItemTag
InputColorTag
Related Tags<ItemTag.color> (Property) Returns the color of a leather armor, potion, filled map, or tipped arrow item. (...)
Description(Property) Sets the color of a leather armor, potion, filled map, or tipped arrow item.
Generated Example
- adjust <player.item_in_hand> color:green
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemColor.java#L15
Namecomponents_patch
ObjectItemTag
InputMapTag
Related Tags<ItemTag.components_patch> (Property) Returns the item's internal component patch. That is, the changes in components on top of the item type's default components. (...)
Description(Property) Sets the item's internal component patch. That is, the changes in components on top of the item type's default components.
The map is in Language:Raw NBT Encoding format.
This is mainly intended for item data persistence, and scripts should prefer using proper item properties instead of setting raw data directly.
If you're trying to control custom data (such as data set by other plugins), use Property:ItemTag.custom_data.
GroupProperties
Warning(s)Due to this being a direct representation of internal data, compatibility for script usage across versions is not guaranteed.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemComponentsPatch.java#L21
Namecustom_data
ObjectItemTag
InputMapTag
Related Tags<ItemTag.custom_data> (Property) Returns an item's custom NBT data, if any. (...)
Description(Property) Sets an item's custom NBT data, if any.
The map is in NBT format, see Language:Raw NBT Encoding.
This does not include any normal vanilla data (enchantments, lore, etc.), just extra custom data.
This is useful for integrating with items from external systems (such as custom items from plugins), but item flags should be preferred otherwise.
Provide no input to clear custom data.
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemCustomData.java#L13
Namecustom_model_data
ObjectItemTag
InputElementTag(Number)
Related Tags<ItemTag.custom_model_data> (Property) Returns the custom model data ID number of the item. (...)
Description(Property) Sets the custom model data ID number of the item.
Use with no input to remove the custom model data.
Prefer Property:ItemTag.item_model on MC 1.21+.
See also Tag:ItemTag.has_custom_model_data
Generated Example
- adjust <player.item_in_hand> custom_model_data:4
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemCustomModel.java#L11
Namedisplay
ObjectItemTag
InputElementTag
Related Tags<ItemTag.display> Returns the display name of the item, as set by plugin or an anvil.
DescriptionChanges the item's display name.
Give no input to remove the item's display name.
Synonyms (Search Aid)itemtag.display_name
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemDisplayname.java#L111
Namedurability
ObjectItemTag
InputElementTag(Number)
Related Tags<ItemTag.durability> Returns the current durability (number of uses) on the item.
<ItemTag.max_durability> (Property) Returns an item's max durability Language:Item Components.
<ItemTag.repairable> Returns whether the item can be repaired. (...)
DescriptionChanges the durability of damageable items.
Generated Example
- adjust <player.item_in_hand> durability:3
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemDurability.java#L96
Nameenchantments
ObjectItemTag
InputMapTag
Related Tags<ItemTag.enchantment_map> Returns a map of enchantments on the item. (...)
DescriptionSets the item's enchantments as a map of EnchantmentTags or enchantment names to level.
For example: - inventory adjust slot:hand enchantments:sharpness=1
Does not remove existing enchantments, for that use Mechanism:ItemTag.remove_enchantments
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemEnchantments.java#L239
Nameessentials_worth
ObjectItemTag
InputElementTag(Decimal)
Related Tags<ItemTag.essentials_worth> Returns the amount of money one of this item is worth in Essentials.
DescriptionSets the worth of this item in Essentials.
Generated Example
- adjust <player.item_in_hand> essentials_worth:1
RequiresDepenizen, Essentials
Sourcehttps://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/properties/essentials/EssentialsItemExtensions.java#L77
Namefirework
ObjectItemTag
InputListTag
Related Tags<ItemTag.firework> Returns the firework's property value as a list, matching the non-MapTag format of the mechanism. (...)
<ItemTag.firework_data> Returns the firework's property value as a ListTag of MapTags, matching the MapTag format of the mechanism.
DescriptionSets the firework's settings.
Each item in the list can be any of the following:
1: Comma-separated effect data in the format: TRAIL,FLICKER,TYPE,RED,GREEN,BLUE,RED,GREEN,BLUE
For example: true,false,BALL,255,0,0,0,255,0 would create a trailing ball firework that fades from red to green.
2: A MapTag, with "type", "color", "fade_color", "trail", and "flicker" keys.
For example: [type=ball;color=red;fade_color=green;trail=true;flicker=false]
3: A single number, to set the power.
Types: ball, ball_large, star, burst, or creeper
"color" and "fade_color" may be a list of colors.
Note that this is an add operation, provide no input to clear all effects.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemFirework.java#L160
Namefirework_power
ObjectItemTag
InputElementTag(Number)
Related Tags<ItemTag.firework_power> (Property) Returns the firework's power. (...)
Description(Property) Sets the firework's power.
Power primarily affects how high the firework flies, with each level of power corresponding to approximately half a second of additional flight time.
Generated Example
- adjust <player.item_in_hand> firework_power:3
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemFireworkPower.java#L10
Nameflag
ObjectItemTag
InputObjectTag
Related Tags<FlaggableObject.flag[<flag_name>]> Returns the specified flag from the flaggable object. (...)
<FlaggableObject.has_flag[<flag_name>]> Returns true if the flaggable object has the specified flag, otherwise returns false. (...)
<FlaggableObject.flag_expiration[<flag_name>]> Returns a TimeTag indicating when the specified flag will expire. (...)
<FlaggableObject.list_flags> Returns a list of the flaggable object's flags. (...)
DescriptionModifies a flag on this item, using syntax similar to Command:flag.
For example, 'flag:myflagname:!' will remove flag 'myflagname', or 'flag:myflagname:3' sets flag 'myflagname' to value '3'.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemFlags.java#L119
Nameflag_map
ObjectItemTag
InputMapTag
DescriptionInternal-usage direct re-setter for the item's full raw flag data.
DeprecatedInternal-usage only.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemFlags.java#L107
Namefood
ObjectItemTag
InputMapTag
Related Tags<ItemTag.food> (Property) Returns an item's food Language:Item Components. (...)
Description(Property) Sets an item's food Language:Item Components.
The map includes keys:
- "nutrition", ElementTag(Number) representing the amount of food points restored by this item.
- "saturation", ElementTag(Decimal) representing the amount of saturation points restored by this item.
- "can_always_eat", ElementTag(Boolean) controlling whether the item can always be eaten, even if the player isn't hungry.
Provide no input to reset the item to its default value.
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/datacomponents/FoodAdapter.java#L11
Namefull_render
ObjectItemTag
InputElementTag
Related Tags<ItemTag.map> Returns the ID number of the map item's map.
<ItemTag.map_scale> Returns the scale of the map, from 0 (smallest) to 4 (largest).
DescriptionFully renders all or part of a map item's view of the world.
Be warned that this can run very slowly on large maps.
Input can be nothing to render the full map, or a comma separated set of integers to render part of the map, in format x1,z1,x2,z2.
Input numbers are pixel indices within the map image - so, any integer from 0 to 128.
The input for a full map render would be 0,0,128,128.
Example
# Use to render sections slowly (to reduce server impact):
- repeat 16 as:x:
    - adjust <item[filled_map[map=4]]> full_render:<[x].sub[1].mul[8]>,0,<[x].mul[8]>,128
    - wait 2t
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemMap.java#L167
Nameglider
ObjectItemTag
InputElementTag(Boolean)
Related Tags<ItemTag.glider> (Property) Returns whether an item can be used to glide when equipped (like elytras by default), see Language:Item Components.
Description(Property) Sets whether an item can be used to glide when equipped (like elytras by default), see Language:Item Components.
Provide no input to reset the item to its default value.
Generated Example
- adjust <player.item_in_hand> glider:false
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/datacomponents/GliderAdapter.java#L7
Namehides
ObjectItemTag
InputListTag
Related Tags<ItemTag.hides> Returns a list of item data types to be hidden from view on this item. (...)
DescriptionSets the item's list of data types to hide.
Valid hide types include: ATTRIBUTES, DESTROYS, ENCHANTS, PLACED_ON, ITEM_DATA, UNBREAKABLE, DYE, or ALL.
ITEM_DATA hides potion effects, banner patterns, etc.
Use "ALL" to automatically hide all hideable item data.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemHidden.java#L122
Nameinstrument
ObjectItemTag
InputElementTag
Related Tags<ItemTag.instrument> (Property) A goat horn's instrument, if any. (...)
Description(Property) A goat horn's instrument, if any.
Goat horns will default to playing "ponder_goat_horn" when the instrument is unset, although this is effectively random and shouldn't be relied on.
Valid instruments are: admire_goat_horn, call_goat_horn, dream_goat_horn, feel_goat_horn, ponder_goat_horn, seek_goat_horn, sing_goat_horn, yearn_goat_horn.
For the mechanism: provide no input to unset the instrument.
Example
# This can narrate: "This horn has the ponder_goat_horn instrument!"
- narrate "This horn has the <player.item_in_hand.instrument> instrument!"
Example
# Forces the player's held item to play seek_goat_horn instead of whatever it played before.
# Would break if the player isn't holding a goat horn.
- inventory adjust slot:hand instrument:seek_goat_horn
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemInstrument.java#L12
Nameinventory_contents
ObjectItemTag
InputListTag(ItemTag)
Related Tags<ItemTag.inventory_contents> (Property) A container item's inventory contents.
Description(Property) A container item's inventory contents.
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemInventoryContents.java#L28
Nameinvisible
ObjectItemTag
InputElementTag(Boolean)
Related Tags<ItemTag.invisible> Returns whether an Item_Frame item will be invisible when placed.
DescriptionChanges whether an Item_Frame item will be invisible when placed.
Generated Example
- adjust <player.item_in_hand> invisible:false
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemFrameInvisible.java#L87
Nameis_waxed
ObjectItemTag
InputElementTag(Boolean)
Related Tags<ItemTag.is_waxed> (Property) Returns whether a sign item is waxed (cannot be edited once placed).
Description(Property) Sets whether a sign item is waxed (cannot be edited once placed).
Generated Example
- adjust <player.item_in_hand> is_waxed:true
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemSignIsWaxed.java#L13
Nameitem_model
ObjectItemTag
InputElementTag
Related Tags<ItemTag.item_model> (Property) Returns an item's model Language:Item Components in namespaced key format. (...)
Description(Property) Sets an item's model Language:Item Components in namespaced key format.
The default namespace is "minecraft", so for example an input of "stone" becomes "minecraft:stone", and will set the item model to a stone block.
This can also be used to display item models from your own custom resource packs.
Provide no input to reset the item to its default value.
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/datacomponents/ItemModelAdapter.java#L11
Nameknowledge_book_recipes
ObjectItemTag
InputListTag
Related Tags<ItemTag.knowledge_book_recipes> Returns a recipes unlocked by this knowledge book. Recipes are in the Namespace:Key format, for example "minecraft:gold_nugget". (...)
DescriptionSets the item's knowledge book recipe list, in the Namespace:Key format.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemKnowledgeBookRecipes.java#L98
Namelock
ObjectItemTag
InputElementTag
Related Tags<ItemTag.lock> Returns the lock password of this item.
<ItemTag.is_locked> Returns whether this item has a lock password.
<ItemTag.is_lockable> Returns whether the item is lockable. (...)
DescriptionSets the item's lock password.
Locked blocks can only be opened while holding an item with the name of the lock.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemLock.java#L102
Namelodestone_location
ObjectItemTag
InputLocationTag
Related Tags<ItemTag.lodestone_location> Returns the lodestone location this compass is pointing at (if any). (...)
DescriptionChanges the lodestone location this compass is pointing at.
See also Mechanism:ItemTag.lodestone_tracked
Give no input to unset.
Generated Example
- adjust <player.item_in_hand> lodestone_location:<player.location>
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemLodestoneLocation.java#L96
Namelodestone_tracked
ObjectItemTag
InputElementTag(Boolean)
Related Tags<ItemTag.lodestone_tracked> Returns whether the compass will track a lodestone. If "true", the compass will only work if there's a lodestone at the target location. (...)
DescriptionChanges whether the compass will track a lodestone. If "true", the compass will only work if there's a lodestone at the target location.
See also Mechanism:ItemTag.lodestone_location
Generated Example
- adjust <player.item_in_hand> lodestone_tracked:true
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemLodestoneTracked.java#L80
Namelore
ObjectItemTag
InputListTag
Related Tags<ItemTag.lore> Returns lore as a ListTag.
DescriptionSets the item's lore.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemLore.java#L114
Namemap
ObjectItemTag
InputElementTag(Number)
Related Tags<ItemTag.map> Returns the ID number of the map item's map.
<ItemTag.map_scale> Returns the scale of the map, from 0 (smallest) to 4 (largest).
DescriptionChanges what map ID number a map item uses.
Generated Example
- adjust <player.item_in_hand> map:2
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemMap.java#L153
Namemap_center
ObjectItemTag
InputLocationTag
Related Tags<ItemTag.map_center> Returns the center location on the map's display. (...)
DescriptionSets the map's center location (the location in the middle of the map's display).
Generated Example
- adjust <player.item_in_hand> map_center:<npc.location>
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemMap.java#L231
Namemap_locked
ObjectItemTag
InputElementTag(Boolean)
Related Tags<ItemTag.map> Returns the ID number of the map item's map.
<ItemTag.map_locked> Returns whether maps with the same ID as this map are locked.
DescriptionChanges whether the map is currently locked.
Note that this applies globally to all map items with the same ID.
Generated Example
- adjust <player.item_in_hand> map_locked:true
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemMap.java#L211
Namematerial
ObjectItemTag
InputMaterialTag
Related Tags<ItemTag.material> Returns the MaterialTag that is the basis of the item. (...)
DescriptionChanges the item's material to the given material.
Only copies the base material type, not any advanced block-data material properties.
Note that this may cause some properties of the item to be lost.
Generated Example
- adjust <player.item_in_hand> material:stick
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/ItemTag.java#L735
Namemax_durability
ObjectItemTag
InputElementTag(Number)
Related Tags<ItemTag.max_durability> (Property) Returns an item's max durability Language:Item Components.
Description(Property) Sets an item's max durability Language:Item Components.
Provide no input to reset the item to its default value.
Generated Example
- adjust <player.item_in_hand> max_durability:2
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/datacomponents/MaxDurabilityAdapter.java#L9
Namemax_stack_size
ObjectItemTag
InputElementTag(Number)
Related Tags<ItemTag.max_stack_size> (Property) Returns an item's max stack size Language:Item Components.
Description(Property) Sets an item's max stack size Language:Item Components.
Provide no input to reset the item to its default value.
Generated Example
- adjust <player.item_in_hand> max_stack_size:2
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/datacomponents/MaxStackSizeAdapter.java#L9
Namepatterns
ObjectItemTag
InputListTag
Related Tags<ItemTag.patterns> Lists a banner's patterns in the form "COLOR/PATTERN|COLOR/PATTERN" etc. (...)
<server.pattern_types> Returns a list of all banner patterns known to the server. (...)
DescriptionChanges the patterns of a banner. Input must be in the form
"COLOR/PATTERN|COLOR/PATTERN" etc.
For the list of possible colors, see 🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/DyeColor.html.
For the list of possible patterns, see 🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/block/banner/PatternType.html.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemPatterns.java#L146
Namepotion_effects
ObjectItemTag
InputListTag
Related Tags<ItemTag.effects_data> Returns a list of all potion effects on this item, in the same format as the MapTag input to the mechanism. (...)
<server.potion_types> Returns a list of all potion types known to the server, including their "strong" and extended variants. (...)
<server.potion_effect_types> Returns a list of all potion effects known to the server. (...)
DescriptionSets the item's potion effect(s).
This applies to Potion items, Tipped Arrow items, and Suspicious Stews.

For potions or tipped arrows (not suspicious stew), the first item in the list must be a MapTag with keys:
"base_type" - from 🔗https://minecraft.wiki/w/Potion#Item_data (optional, becomes an uncraftable potion when unset).
"translation_id" - controls the translation key used for the default item display name. The translation key used is "item.minecraft.<item type>.effect.<id>" (optional).

For example: [base_type=strong_swiftness]
This example produces an item labeled as "Potion of Swiftness - Speed II (1:30)"

Each following item in the list are potion effects, which must be a MapTag in Language:Potion Effect Format.

A very short full default potion item would be: potion[potion_effects=[base_type=regeneration]
A (relatively) short full potion item would be: potion[potion_effects=<list[[base_type=regeneration]|[effect=speed;duration=10s]]>]
(Note the list constructor to force data format interpretation, as potion formats can be given multiple ways and the system will get confused without a constructor)
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemPotion.java#L277
Namequantity
ObjectItemTag
InputElementTag(Number)
Related Tags<ItemTag.quantity> Returns the number of items in the ItemTag's itemstack.
<ItemTag.max_stack> Returns the max number of this item possible in a single stack of this type. (...)
DescriptionChanges the number of items in this stack.
Generated Example
- adjust <player.item_in_hand> quantity:1
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemQuantity.java#L100
Namerarity
ObjectItemTag
InputElementTag
Related Tags<ItemTag.rarity> (Property) Returns an item's rarity Language:Item Components. (...)
Description(Property) Sets an item's rarity Language:Item Components.
See 🔗https://jd.papermc.io/paper/org/bukkit/inventory/ItemRarity.html for valid rarity values.
Provide no input to reset the item to its default value.
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/datacomponents/RarityAdapter.java#L10
Nameraw_nbt
ObjectItemTag
InputMapTag
Related Tags<ItemTag.raw_nbt> Returns a map of all non-default raw NBT on this item. (...)
<ItemTag.all_raw_nbt> Returns a map of all raw NBT on this item, including default values. (...)
DescriptionSets the given map of raw NBT keys onto this item.
Note that the input format must be strictly perfect.
Refer to Language:Raw NBT Encoding for explanation of the input format.
Deprecated in favor of Property:ItemTag.custom_data on MC 1.20+.
Deprecateduse 'ItemTag.custom_data'
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemRawNBT.java#L378
Nameremove_attribute_modifiers
ObjectItemTag
InputListTag
Related Tags<ItemTag.attribute_modifiers> (Property) Returns the attribute modifiers of an item, with key as the attribute name and value as a list of modifiers, (...)
DescriptionRemoves attribute modifiers from an item. Specify a list of attribute names or modifier keys (UUIDs on versions below MC 1.21) as input.
See also Language:attribute modifiers.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemAttributeModifiers.java#L143
Nameremove_charged_projectiles
ObjectItemTag
InputNone
Related Tags<ItemTag.charged_projectiles> Returns a list of charged projectile items on this crossbow.
<ItemTag.is_charged> Returns whether this crossbow is charged.
DescriptionRemoves all charged projectiles from this crossbow.
Generated Example
- adjust <player.item_in_hand> remove_charged_projectiles
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemChargedProjectile.java#L151
Nameremove_component
ObjectItemTag
InputElementTag
DescriptionRemoves the specified item component from the item, see Language:Item Components for more information.
This can be used to remove item's default behavior, such as making consumable items non-consumable.
See also Property:ItemTag.removed_components.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/properties/ItemRemovedComponents.java#L68
Nameremove_enchantments
ObjectItemTag
InputListTag
Related Tags<ItemTag.enchantment_types> Returns a list of the types of enchantments on the item.
<ItemTag.enchantment_map> Returns a map of enchantments on the item. (...)
DescriptionRemoves the specified enchantments from the item (as a list of EnchantmentTags).
Give no value input to remove all enchantments.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemEnchantments.java#L193
Nameremoved_components
ObjectItemTag
InputListTag
Related Tags<ItemTag.removed_components> (Property) Returns the item components explicitly removed from an item. (...)
Description(Property) Sets the item components explicitly removed from an item.
This can be used to remove item's default behavior, such as making consumable items non-consumable.
Alternatively, use Mechanism:ItemTag.remove_component to remove a single component.
See Language:Item Components for more information.
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/properties/ItemRemovedComponents.java#L14
Namerepair_cost
ObjectItemTag
InputElementTag(Number)
Related Tags<ItemTag.repair_cost> Returns the current repair cost (on an anvil) for this item. (...)
DescriptionChanges the repair cost (on an anvil) of the item.
Generated Example
- adjust <player.item_in_hand> repair_cost:1
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemRepairCost.java#L85
Namesign_contents
ObjectItemTag
InputListTag
Related Tags<ItemTag.sign_contents> Returns a list of lines on a sign item.
DescriptionSets the contents of a sign item.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemSignContents.java#L92
Nameskull_skin
ObjectItemTag
InputElementTag(|ElementTag(|ElementTag))
Related Tags<ItemTag.skull_skin> Returns the UUID of the player whose skin a skull item uses. (...)
<ItemTag.skin> Returns the UUID of the player whose skin a skull item uses. (...)
<ItemTag.has_skin> Returns whether the item has a custom skin set. (...)
DescriptionSets the player skin on a player_head.
A head should have a Texture blob, the player's UUID, and the player's Name.
The most-correct input is UUID|Texture|Name.
You can alternately input Name|Texture|UUID and the order will be automatically corrected.
You can alternately input just a UUID, or just a Name, or just UUID|Texture, or just Name|Texture, and the missing data will be downloaded.
You can alternately input just a Texture and the remaining data will be filled as name "null" and UUID "000-000". Doing this may cause side effects with Minecraft internals or external plugins, use with caution.
See also Language:Player Entity Skins (Skin Blobs).
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemSkullskin.java#L140
Namespawner_count
ObjectItemTag
InputElementTag(Number)
Related Tags<ItemTag.spawner_count> Returns the spawn count for a spawner block item.
DescriptionSets the spawn count of a spawner block item.
Generated Example
- adjust <player.item_in_hand> spawner_count:3
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemSpawnerCount.java#L83
Namespawner_delay_data
ObjectItemTag
InputListTag
Related Tags<ItemTag.spawner_spawn_delay> Returns the current spawn delay for a spawner block item. (...)
<ItemTag.spawner_minimum_spawn_delay> Returns the minimum spawn delay for a spawner block item.
<ItemTag.spawner_maximum_spawn_delay> Returns the maximum spawn delay for a spawner block item.
DescriptionSets the current spawn delay, minimum spawn delay, and maximum spawn delay of a mob spawner block item.
For example, -1|200|800
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemSpawnerDelay.java#L115
Namespawner_max_nearby_entities
ObjectItemTag
InputElementTag(Number)
Related Tags<ItemTag.spawner_max_nearby_entities> Returns the maximum nearby entities for a spawner block item.
DescriptionSets the maximum nearby entities of a spawner block item.
Generated Example
- adjust <player.item_in_hand> spawner_max_nearby_entities:3
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemSpawnerMaxNearbyEntities.java#L83
Namespawner_player_range
ObjectItemTag
InputElementTag(Number)
Related Tags<ItemTag.spawner_player_range> Returns the maximum player range for a spawner block item (ie how close a player must be for this spawner to be active).
DescriptionSets the maximum player range of a spawner block item.
Generated Example
- adjust <player.item_in_hand> spawner_player_range:3
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemSpawnerPlayerRange.java#L83
Namespawner_range
ObjectItemTag
InputElementTag(Number)
Related Tags<ItemTag.spawner_range> Returns the spawn range for a spawner block item (the radius mobs will spawn in).
DescriptionSets the spawn range of a spawner block item (the radius mobs will spawn in).
Generated Example
- adjust <player.item_in_hand> spawner_range:2
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemSpawnerRange.java#L83
Namespawner_type
ObjectItemTag
InputEntityTag
Related Tags<ItemTag.spawner_type> (Property) The entity type a spawner item will spawn, if any. (...)
Description(Property) The entity type a spawner item will spawn, if any.
For the mechanism: provide no input to unset the type.
Note that the type can only be unset on 1.20 and above.
Generated Example
- adjust <player.item_in_hand> spawner_type:<player>
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemSpawnerType.java#L14
Nametrim
ObjectItemTag
InputMapTag
Related Tags<ItemTag.trim> (Property) An armor item's trim. (...)
Description(Property) An armor item's trim.
Allowed keys: material, pattern.
Valid material values can be found here: 🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/meta/trim/TrimMaterial.html
Valid pattern values can be found here: 🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/meta/trim/TrimPattern.html
Valid values also include ones added by datapacks, plugins, etc. as a namespaced key.
For the mechanism, if an item already has a trim, you can omit either material or pattern to keep the original data while also changing the other option.
For example, if you only want to change the pattern and not the material, you can omit the material, and it will use the already existing material.
To remove the trim provide no input.
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemTrim.java#L16
Nameunbreakable
ObjectItemTag
InputElementTag(Boolean)
Related Tags<ItemTag.unbreakable> Returns whether an item has the unbreakable flag.
DescriptionChanges whether an item has the unbreakable item flag.
Generated Example
- adjust <player.item_in_hand> unbreakable:true
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemUnbreakable.java#L70
Nameworth
ObjectItemTag
InputElementTag(Decimal)
Related Tags<ItemTag.essentials_worth> Returns the amount of money one of this item is worth in Essentials.
DescriptionDeprecated in favor of Mechanism:ItemTag.essentials_worth.
Generated Example
- adjust <player.item_in_hand> worth:1.5
RequiresDepenizen, Essentials
DeprecatedUse 'ItemTag.essentials_worth'
Sourcehttps://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/properties/essentials/EssentialsItemExtensions.java#L65
Nameburied_item
ObjectLocationTag
InputItemTag
Related Tags<LocationTag.buried_item> Returns the item buried in a brushable block (also referred to as "suspicious blocks"). Returns air if there is no item buried.
DescriptionSets the buried item in a brushable block (also referred to as "suspicious blocks"). Set to air to have no item buried.
Generated Example
- adjust <player.location> buried_item:stick
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L4436
Namecampfire_items
ObjectLocationTag
InputListTag(ItemTag)
Related Tags<LocationTag.campfire_items> Returns a list of items currently in this campfire. (...)
DescriptionSets the items in this campfire, as a list of items, where the index in the list directly corresponds to index in the campfire slots.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L5448
Nameitem_type
ObjectNPCTag
InputItemTag
DescriptionSets the item type of the item.
Generated Example
- adjust <npc> item_type:iron_sword
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/NPCTag.java#L1727
Nameitem_on_cursor
ObjectPlayerTag
InputItemTag
Related Tags<PlayerTag.item_on_cursor> Returns the item on the player's cursor, if any. This includes (...)
DescriptionSets the item on the player's cursor.
This includes chest interfaces, inventories, and hotbars, etc.
Generated Example
- adjust <player> item_on_cursor:stick
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L2942
Nameitem_slot
ObjectPlayerTag
InputElementTag(Number)
Related Tags<PlayerTag.held_item_slot> Returns the slot location of the player's selected item.
DescriptionSets the inventory slot that the player has selected.
Works with offline players.
Generated Example
- adjust <player> item_slot:4
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L2895

ObjectType


NameItemTag
Prefixi@
Base TypeElementTag
ImplementsFlaggableObject, PropertyHolderObject
Identity FormatThe identity format for items is the basic material type name, or an item script name. Other data is specified in properties.
For example, 'i@stick'.
DescriptionAn ItemTag represents a holdable item generically.

ItemTags are temporary objects, to actually modify an item in an inventory you must add the item into that inventory.

ItemTags do NOT remember where they came from. If you read an item from an inventory, changing it
does not change the original item in the original inventory. You must set it back in.

Find a list of valid materials at:
🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html
Note that some materials on that list are exclusively for use with blocks, and cannot be held as items.

This object type is flaggable.
Flags on this object type will be stored in the item NBT.
MatchableItemTag matchers, sometimes identified as "<item>", often seen as "with:<item>":
"potion": plaintext: matches if the item is any form of potion item.
"script": plaintext: matches if the item is any form of script item.
"item_flagged:<flag>": A Flag Matcher for item flags.
"item_enchanted:<enchantment>": matches if the item is enchanted with the given enchantment name (excluding enchantment books). Allows advanced matchers.
"raw_exact:<item>": matches based on exact raw item data comparison (almost always a bad idea to use).
Item property format: will validate that the item material matches and all directly specified properties also match. Any properties not specified won't be checked.
for example "stick[display=Hi]" will match any 'stick' with a displayname of 'hi', regardless of whether that stick has lore or not, or has enchantments or not, or etc.
Item script names: matches if the item is a script item with the given item script name, using advanced matchers.
If none of the above are used, uses MaterialTag matchables. Refer to MaterialTag matchable list above.
Note that "item" plaintext is always true.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/ItemTag.java#L56

Tag


Name<ElementTag.as_item>
ReturnsItemTag
DescriptionDeprecated in favor of Tag:ObjectTag.as
Generated Example
- give <element[hello_world].as_item>
Groupconversion
Deprecateduse as[item]
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/bukkit/BukkitElementExtensions.java#L154
Name<ElementTag.hover_item[<item>]>
ReturnsElementTag
DescriptionAdds a hover message to the element, which makes the element display the input ItemTag when the mouse is left over it.
Note that this is a magic Denizen tool - refer to Language:Denizen Text Formatting.
Example
- narrate "You can <element[hover here].custom_color[emphasis].hover_item[<player.item_in_hand>]> to see what you held!"
Grouptext manipulation
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/bukkit/BukkitElementExtensions.java#L450
Name<ElementTag.to_itemscript_hash>
ReturnsElementTag
DescriptionShortens the element down to an itemscript hash ID, made of invisible color codes.
This is considered a historical system, no longer relevant to modern Denizen.
Generated Example
- narrate <element[hello_world].to_itemscript_hash>
Groupconversion
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/bukkit/BukkitElementExtensions.java#L362
Name<EnchantmentTag.can_enchant[<item>]>
ReturnsElementTag(Boolean)
DescriptionReturns whether this enchantment can enchant the given ItemTag (based on material mainly).
This is internally based on multiple factors, such as the enchantment's category and its own specific compatibility checks.
Example
# In the case of the "knockback" enchantment, this narrates
# "You can apply the knockback enchantment in a diamond sword!"
- if <enchantment[knockback].can_enchant[diamond_sword]>:
    - narrate "You can apply the knockback enchantment in a diamond sword!"
- else:
    - narrate "You cannot apply the knockback enchantment in a diamond sword!"
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EnchantmentTag.java#L352
Name<EntityTag.can_pickup_items>
ReturnsElementTag(Boolean)
MechanismEntityTag.can_pickup_items
DescriptionReturns whether the entity can pick up items.
Generated Example
- if <player.can_pickup_items>:
    - narrate "it was true!"
- else:
    - narrate "it was false!"
Groupattributes
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EntityTag.java#L1700
Name<EntityTag.drops_item>
ReturnsElementTag(Boolean)
MechanismEntityTag.drops_item
Description(Property) Whether an eye of ender drops an item when breaking or shatters.
See Property:EntityTag.item for controlling an eye's item.
Generated Example
- if <player.drops_item>:
    - narrate "it was true!"
- else:
    - narrate "it was false!"
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityDropsItem.java#L10
Name<EntityTag.firework_item>
ReturnsItemTag
MechanismEntityTag.firework_item
DescriptionIf the entity is a firework, returns the firework item used to launch it.
Generated Example
- give <player.firework_item>
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityFirework.java#L62
Name<EntityTag.framed_item_rotation>
ReturnsElementTag
MechanismEntityTag.framed
DescriptionIf the entity is an item frame, returns the rotation of the item currently framed.
Generated Example
- narrate <player.framed_item_rotation>
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityFramed.java#L87
Name<EntityTag.framed_item>
ReturnsItemTag
MechanismEntityTag.framed
DescriptionIf the entity is an item frame, returns the item currently framed.
Generated Example
- give <player.framed_item>
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityFramed.java#L100
Name<EntityTag.has_equipped[<item-matcher>]>
ReturnsElementTag(Boolean)
DescriptionReturns whether the entity has any armor equipment item that matches the given item matcher, using the system behind Language:Advanced Object Matching.
For example, has_equipped[diamond_*] will return true if the entity is wearing at least one piece of diamond armor.
Groupelement checking
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EntityTag.java#L2659
Name<EntityTag.has_framed_item>
ReturnsElementTag(Boolean)
MechanismEntityTag.framed
DescriptionIf the entity is an item frame, returns whether the frame has an item in it.
Generated Example
- if <player.has_framed_item>:
    - narrate "it was true!"
- else:
    - narrate "it was false!"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityFramed.java#L113
Name<EntityTag.item_in_hand>
ReturnsItemTag
MechanismEntityTag.item_in_hand
DescriptionReturns the item the entity is holding, or air if none.
Generated Example
- give <player.item_in_hand>
Groupinventory
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityItemInHand.java#L69
Name<EntityTag.item_in_offhand>
ReturnsItemTag
MechanismEntityTag.item_in_offhand
DescriptionReturns the item the entity is holding in their off hand, or air if none.
Generated Example
- give <player.item_in_offhand>
Groupinventory
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityItemInOffHand.java#L69
Name<EntityTag.item>
ReturnsItemTag
MechanismEntityTag.item
Description(Property) An entity's item, which can be:
- the item represented and displayed by a dropped item.
- the item represented by a thrown trident.
- a throwable projectile's display item.
- an eye-of-ender's item, which is both displayed and dropped.
- a fireball's display item.
- an item display's display item.
- an ominous item spawner's display item.
Generated Example
- give <player.item>
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityItem.java#L13
Name<InventoryTag.can_fit[<item>].count>
ReturnsElementTag(Number)
DescriptionReturns the total count of how many times an item can fit into an inventory.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L1241
Name<InventoryTag.can_fit[<item>].quantity[<#>]>
ReturnsElementTag(Boolean)
DescriptionReturns whether the inventory can fit a certain quantity of an item.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L1260
Name<InventoryTag.can_fit[<item>|...]>
ReturnsElementTag(Boolean)
DescriptionReturns whether the inventory can fit an item, or list of items.
When giving multiple item inputs, the tag will only return true if every item can be added to the inventory at once.
If only some fit, the tag will return false.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L1213
Name<InventoryTag.contains_item[<matcher>].quantity[<#>]>
ReturnsElementTag(Boolean)
DescriptionReturns whether the inventory contains a certain number of items that match the specified item matcher.
Uses the system behind Language:Advanced Object Matching.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L1467
Name<InventoryTag.contains_item[<matcher>]>
ReturnsElementTag(Boolean)
DescriptionReturns whether the inventory contains any item that matches the specified item matcher.
Uses the system behind Language:Advanced Object Matching.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L1453
Name<InventoryTag.exclude_item[<item_matcher>].quantity[<#>]>
ReturnsInventoryTag
DescriptionReturns the InventoryTag with a certain quantity of matching items excluded.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L1354
Name<InventoryTag.exclude_item[<item_matcher>]>
ReturnsInventoryTag
DescriptionReturns a copy of the InventoryTag with all matching items excluded.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L1331
Name<InventoryTag.find_all_items[<matcher>]>
ReturnsListTag
DescriptionReturns a list of the location of all slots that contains an item that matches the given item matcher.
Returns an empty list if there's no match.
Uses the system behind Language:Advanced Object Matching.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L1887
Name<InventoryTag.find_item[<matcher>]>
ReturnsElementTag(Number)
DescriptionReturns the location of the first slot that contains an item that matches the given item matcher.
Returns -1 if there's no match.
Uses the system behind Language:Advanced Object Matching.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L1863
Name<InventoryTag.include[<item>].quantity[<#>]>
ReturnsInventoryTag
DescriptionReturns the InventoryTag with a certain quantity of an item added.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L1309
Name<InventoryTag.include[<item>|...]>
ReturnsInventoryTag
DescriptionReturns a copy of the InventoryTag with items added.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L1287
Name<InventoryTag.quantity_item[(<matcher>)]>
ReturnsElementTag(Number)
DescriptionReturns the combined quantity of itemstacks that match an item matcher if one is specified,
or the combined quantity of all itemstacks if one is not.
Uses the system behind Language:Advanced Object Matching.
Generated Example
- narrate "the number value is <player.inventory.quantity_item>"
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L2025
Name<InventoryTag.stacks[(<item>)]>
ReturnsElementTag(Number)
DescriptionReturns the number of itemstacks that match an item if one is specified, or the number of all itemstacks if one is not.
Generated Example
- narrate "the number value is <player.inventory.stacks>"
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L2081
Name<ItemTag.all_raw_nbt>
ReturnsMapTag
MechanismItemTag.raw_nbt
DescriptionReturns a map of all raw NBT on this item, including default values.
Refer to format details at Language:Raw NBT Encoding.
Generated Example
- foreach <player.item_in_hand.all_raw_nbt> key:key as:val:
    - narrate "<[key]> is set as <[val]>"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemRawNBT.java#L396
Name<ItemTag.armor_pose>
ReturnsMapTag
MechanismItemTag.armor_pose
Description(Property) Returns the pose of this armor stand item.
Allowed keys: head, body, left_arm, right_arm, left_leg, right_leg
Generated Example
- foreach <player.item_in_hand.armor_pose> key:key as:val:
    - narrate "<[key]> is set as <[val]>"
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemArmorPose.java#L22
Name<ItemTag.armor_stand_data>
ReturnsMapTag
MechanismItemTag.armor_stand_data
DescriptionReturns a map of basic armor stand data, with keys matching EntityTag property names.
Keys: base_plate, visible, marker, is_small, arms
Generated Example
- foreach <player.item_in_hand.armor_stand_data> key:key as:val:
    - narrate "<[key]> is set as <[val]>"
Groupproperties
RequiresPaper
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/properties/ItemArmorStand.java#L67
Name<ItemTag.attribute_modifiers>
ReturnsMapTag
MechanismItemTag.attribute_modifiers
Description(Property) Returns the attribute modifiers of an item, with key as the attribute name and value as a list of modifiers,
where each modifier is a MapTag containing keys 'name', 'amount', 'slot', 'operation', and 'id'.
For use as a mechanism, this is a SET operation, meaning pre-existing modifiers are removed.
For format details, refer to Language:attribute modifiers.
Generated Example
- foreach <player.item_in_hand.attribute_modifiers> key:key as:val:
    - narrate "<[key]> is set as <[val]>"
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemAttributeModifiers.java#L30
Name<ItemTag.base_color>
ReturnsElementTag
MechanismItemTag.base_color
Description(Property) Returns the base color of a shield.
For the list of possible colors, see 🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/DyeColor.html.
Give no input with a shield to remove the base color (and any patterns).
Tag returns null if there is no base color or patterns.
Generated Example
- narrate <player.item_in_hand.base_color>
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemBaseColor.java#L12
Name<ItemTag.block_material>
ReturnsMaterialTag
MechanismItemTag.block_material
DescriptionReturns the material for an item with complex-block-data attached.
Generated Example
- foreach <player.location.find_blocks[<player.item_in_hand.block_material>].within[5]> as:loc:
    - modifyblock <[loc]> air
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemBlockMaterial.java#L48
Name<ItemTag.book_author>
ReturnsElementTag
MechanismItemTag.book_author
DescriptionReturns the author of the book.
Generated Example
- narrate <player.item_in_hand.book_author>
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemBook.java#L57
Name<ItemTag.book_generation>
ReturnsListTag
MechanismItemTag.book_generation
DescriptionReturns the generation of the book (if any), as ORIGINAL, COPY_OF_ORIGINAL, COPY_OF_COPY, or TATTERED.
Generated Example
- foreach <player.item_in_hand.book_generation> as:entry:
    - narrate "found <[entry]>"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemBookGeneration.java#L48
Name<ItemTag.book_map>
ReturnsMapTag
MechanismItemTag.book
DescriptionReturns a MapTag of data about the book, with keys "pages" (a ListTag), and when available, "author" and "title".
Generated Example
- foreach <player.item_in_hand.book_map> key:key as:val:
    - narrate "<[key]> is set as <[val]>"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemBook.java#L100
Name<ItemTag.book_pages>
ReturnsListTag
MechanismItemTag.book_pages
DescriptionReturns the plain-text pages of the book as a ListTag.
Generated Example
- foreach <player.item_in_hand.book_pages> as:entry:
    - narrate "found <[entry]>"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemBook.java#L83
Name<ItemTag.book_title>
ReturnsElementTag
MechanismItemTag.book_title
DescriptionReturns the title of the book.
Generated Example
- narrate <player.item_in_hand.book_title>
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemBook.java#L70
Name<ItemTag.bukkit_serial>
ReturnsElementTag
DescriptionReturns a YAML text section representing the Bukkit serialization of the item, under subkey "item".
Generated Example
- narrate <player.item_in_hand.bukkit_serial>
Groupconversion
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/ItemTag.java#L655
Name<ItemTag.can_destroy>
ReturnsListTag(MaterialTag)
MechanismItemTag.can_destroy
DescriptionReturns a list of materials this item can destroy while in adventure mode, if any.
Generated Example
- foreach <player.item_in_hand.can_destroy> as:entry:
    - narrate "found <[entry]>"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemCanDestroy.java#L67
Name<ItemTag.can_place_on>
ReturnsListTag(MaterialTag)
MechanismItemTag.can_place_on
DescriptionReturns a list of materials this item can be placed on while in adventure mode, if any.
Generated Example
- foreach <player.item_in_hand.can_place_on> as:entry:
    - narrate "found <[entry]>"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemCanPlaceOn.java#L67
Name<ItemTag.charged_projectiles>
ReturnsListTag(ItemTag)
MechanismItemTag.charged_projectiles
DescriptionReturns a list of charged projectile items on this crossbow.
Generated Example
- foreach <player.item_in_hand.charged_projectiles> as:entry:
    - narrate "found <[entry]>"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemChargedProjectile.java#L50
Name<ItemTag.color>
ReturnsColorTag
MechanismItemTag.color
Description(Property) Returns the color of a leather armor, potion, filled map, or tipped arrow item.
For potions, will return a white ObjectType:ColorTag if the given item doesn't have a color.
For maps, will return null if the given item doesn't have a color.
Generated Example
- inventory adjust slot:hand color:<player.item_in_hand.color>
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemColor.java#L15
Name<ItemTag.components_patch>
ReturnsMapTag
MechanismItemTag.components_patch
Description(Property) Returns the item's internal component patch. That is, the changes in components on top of the item type's default components.
The map is in Language:Raw NBT Encoding format.
This is mainly intended for item data persistence, and scripts should prefer using proper item properties instead of setting raw data directly.
If you're trying to control custom data (such as data set by other plugins), use Property:ItemTag.custom_data.
Note that this is just data that isn't already controlled by other ItemTag properties, see Tag:ItemTag.full_components_patch for the complete component patch.
Generated Example
- foreach <player.item_in_hand.components_patch> key:key as:val:
    - narrate "<[key]> is set as <[val]>"
GroupProperties
Warning(s)Due to this being a direct representation of internal data, compatibility for script usage across versions is not guaranteed.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemComponentsPatch.java#L21
Name<ItemTag.crackshot_weapon>
ReturnsElementTag
DescriptionReturns the CrackShot weapon name for the item.
Generated Example
- narrate <player.item_in_hand.crackshot_weapon>
RequiresDepenizen, CrackShot
Sourcehttps://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/properties/crackshot/CrackShotItemProperties.java#L55
Name<ItemTag.custom_data>
ReturnsMapTag
MechanismItemTag.custom_data
Description(Property) Returns an item's custom NBT data, if any.
The map is in NBT format, see Language:Raw NBT Encoding.
This does not include any normal vanilla data (enchantments, lore, etc.), just extra custom data.
This is useful for integrating with items from external systems (such as custom items from plugins), but item flags should be preferred otherwise.
Example
# Use to check if an item has custom data from another plugin.
- if <[item].custom_data.get[external_plugin_data].if_null[null]> == external_custom_item:
  - narrate "You are using an item from an external plugin!"
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemCustomData.java#L13
Name<ItemTag.custom_model_data>
ReturnsElementTag(Number)
MechanismItemTag.custom_model_data
Description(Property) Returns the custom model data ID number of the item.
Use with no input to remove the custom model data.
Prefer Property:ItemTag.item_model on MC 1.21+.
See also Tag:ItemTag.has_custom_model_data
Generated Example
- narrate "the number value is <player.item_in_hand.custom_model_data>"
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemCustomModel.java#L11
Name<ItemTag.default_attribute_modifiers[<slot>]>
ReturnsMapTag
DescriptionReturns a map of all default attribute modifiers on the item based purely on its material type, for the given slot,
in the same format as Tag:ItemTag.attribute_modifiers
Slot must be one of: HAND, OFF_HAND, FEET, LEGS, CHEST, or HEAD
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemAttributeModifiers.java#L101
Name<ItemTag.display>
ReturnsElementTag
MechanismItemTag.display
DescriptionReturns the display name of the item, as set by plugin or an anvil.
Generated Example
- narrate <player.item_in_hand.display>
Synonyms (Search Aid)itemtag.display_name
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemDisplayname.java#L57
Name<ItemTag.durability>
ReturnsElementTag(Number)
MechanismItemTag.durability
DescriptionReturns the current durability (number of uses) on the item.
Generated Example
- narrate "the number value is <player.item_in_hand.durability>"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemDurability.java#L48
Name<ItemTag.effects_data>
ReturnsListTag(MapTag)
MechanismItemTag.potion_effects
DescriptionReturns a list of all potion effects on this item, in the same format as the MapTag input to the mechanism.
This applies to Potion items, Tipped Arrow items, and Suspicious Stews.
Note that for potions or tipped arrows (not suspicious stew) the first value in the list is the potion's base type.
All subsequent entries are potion effects in Language:Potion Effect Format.
Generated Example
- foreach <player.item_in_hand.effects_data> as:entry:
    - narrate "found <[entry]>"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemPotion.java#L262
Name<ItemTag.enchantment_map>
ReturnsMapTag
MechanismItemTag.enchantments
DescriptionReturns a map of enchantments on the item.
Map keys are enchantment names (like "sharpness"), and values are the level (as a number).
Generated Example
- foreach <player.item_in_hand.enchantment_map> key:key as:val:
    - narrate "<[key]> is set as <[val]>"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemEnchantments.java#L142
Name<ItemTag.enchantment_types>
ReturnsListTag(EnchantmentTag)
MechanismItemTag.enchantments
DescriptionReturns a list of the types of enchantments on the item.
Generated Example
- foreach <player.item_in_hand.enchantment_types> as:entry:
    - narrate "found <[entry]>"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemEnchantments.java#L106
Name<ItemTag.enchantments>
ReturnsListTag
MechanismItemTag.enchantments
DescriptionDeprecated in favor of Tag:ItemTag.enchantment_types or Tag:ItemTag.enchantment_map
Generated Example
- foreach <player.item_in_hand.enchantments> as:entry:
    - narrate "found <[entry]>"
Groupproperties
DeprecatedUse 'enchantment_types' or 'enchantment_map'
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemEnchantments.java#L123
Name<ItemTag.essentials_worth>
ReturnsElementTag(Decimal)
MechanismItemTag.essentials_worth
DescriptionReturns the amount of money one of this item is worth in Essentials.
Generated Example
- narrate "the decimal value is <player.item_in_hand.essentials_worth>"
RequiresDepenizen, Essentials
Sourcehttps://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/properties/essentials/EssentialsItemExtensions.java#L16
Name<ItemTag.firework_data>
ReturnsListTag
MechanismItemTag.firework
DescriptionReturns the firework's property value as a ListTag of MapTags, matching the MapTag format of the mechanism.
Generated Example
- foreach <player.item_in_hand.firework_data> as:entry:
    - narrate "found <[entry]>"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemFirework.java#L133
Name<ItemTag.firework_power>
ReturnsElementTag(Number)
MechanismItemTag.firework_power
Description(Property) Returns the firework's power.
Power primarily affects how high the firework flies, with each level of power corresponding to approximately half a second of additional flight time.
Generated Example
- narrate "the number value is <player.item_in_hand.firework_power>"
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemFireworkPower.java#L10
Name<ItemTag.firework>
ReturnsListTag
MechanismItemTag.firework
DescriptionReturns the firework's property value as a list, matching the non-MapTag format of the mechanism.
Consider instead using Tag:ItemTag.firework_data
Generated Example
- foreach <player.item_in_hand.firework> as:entry:
    - narrate "found <[entry]>"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemFirework.java#L120
Name<ItemTag.food>
ReturnsMapTag
MechanismItemTag.food
Description(Property) Returns an item's food Language:Item Components.
The map includes keys:
- "nutrition", ElementTag(Number) representing the amount of food points restored by this item.
- "saturation", ElementTag(Decimal) representing the amount of saturation points restored by this item.
- "can_always_eat", ElementTag(Boolean) controlling whether the item can always be eaten, even if the player isn't hungry.
Generated Example
- foreach <player.item_in_hand.food> key:key as:val:
    - narrate "<[key]> is set as <[val]>"
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/datacomponents/FoodAdapter.java#L11
Name<ItemTag.formatted>
ReturnsElementTag
DescriptionReturns the formatted material name of the item to be used in a sentence.
Correctly uses singular and plural forms of item names, among other things.
Generated Example
- narrate <player.item_in_hand.formatted>
Groupformatting
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/ItemTag.java#L723
Name<ItemTag.full_components_patch>
ReturnsMapTag
DescriptionReturns the item's entire internal component patch (see Tag:ItemTag.components_patch).
Generated Example
- foreach <player.item_in_hand.full_components_patch> key:key as:val:
    - narrate "<[key]> is set as <[val]>"
Warning(s)Due to this being a direct representation of internal data, compatibility for script usage across versions is not guaranteed.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemComponentsPatch.java#L107
Name<ItemTag.glider>
ReturnsElementTag(Boolean)
MechanismItemTag.glider
Description(Property) Returns whether an item can be used to glide when equipped (like elytras by default), see Language:Item Components.
Generated Example
- if <player.item_in_hand.glider>:
    - narrate "it was true!"
- else:
    - narrate "it was false!"
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/datacomponents/GliderAdapter.java#L7
Name<ItemTag.has_custom_model_data>
ReturnsElementTag(Boolean)
MechanismItemTag.custom_model_data
DescriptionReturns whether the item has a custom model data ID number set on it.
Prefer Property:ItemTag.item_model on MC 1.21+.
See also Tag:ItemTag.custom_model_data.
Generated Example
- if <player.item_in_hand.has_custom_model_data>:
    - narrate "it was true!"
- else:
    - narrate "it was false!"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemCustomModel.java#L53
Name<ItemTag.has_display>
ReturnsElementTag(Boolean)
MechanismItemTag.display
DescriptionReturns whether the item has a custom set display name.
Generated Example
- if <player.item_in_hand.has_display>:
    - narrate "it was true!"
- else:
    - narrate "it was false!"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemDisplayname.java#L73
Name<ItemTag.has_inventory>
ReturnsElementTag(Boolean)
DescriptionReturns whether the item has an inventory.
If this returns true, it will enable access to:
Mechanism:ItemTag.inventory_contents, and Tag:ItemTag.inventory_contents.
Generated Example
- if <player.item_in_hand.has_inventory>:
    - narrate "it was true!"
- else:
    - narrate "it was false!"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/ItemTag.java#L563
Name<ItemTag.has_lore>
ReturnsElementTag(Boolean)
MechanismItemTag.lore
DescriptionReturns whether the item has lore set on it.
Generated Example
- if <player.item_in_hand.has_lore>:
    - narrate "it was true!"
- else:
    - narrate "it was false!"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemLore.java#L71
Name<ItemTag.has_potion_effect>
ReturnsElementTag(Boolean)
MechanismItemTag.potion_effects
DescriptionReturns whether the item (potion, tipped arrow, or suspicious stew) has a potion effect.
Generated Example
- if <player.item_in_hand.has_potion_effect>:
    - narrate "it was true!"
- else:
    - narrate "it was false!"
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemPotion.java#L307
Name<ItemTag.has_skin>
ReturnsElementTag(Boolean)
MechanismItemTag.skull_skin
DescriptionReturns whether the item has a custom skin set.
(Only for 'player_head's)
Generated Example
- if <player.item_in_hand.has_skin>:
    - narrate "it was true!"
- else:
    - narrate "it was false!"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemSkullskin.java#L102
Name<ItemTag.hides>
ReturnsListTag
MechanismItemTag.hides
DescriptionReturns a list of item data types to be hidden from view on this item.
Valid hide types include: ATTRIBUTES, DESTROYS, ENCHANTS, PLACED_ON, ITEM_DATA, UNBREAKABLE, and DYE
ITEM_DATA hides potion effects, banner patterns, etc.
Generated Example
- foreach <player.item_in_hand.hides> as:entry:
    - narrate "found <[entry]>"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemHidden.java#L79
Name<ItemTag.instrument>
ReturnsElementTag
MechanismItemTag.instrument
Description(Property) A goat horn's instrument, if any.
Goat horns will default to playing "ponder_goat_horn" when the instrument is unset, although this is effectively random and shouldn't be relied on.
Valid instruments are: admire_goat_horn, call_goat_horn, dream_goat_horn, feel_goat_horn, ponder_goat_horn, seek_goat_horn, sing_goat_horn, yearn_goat_horn.
For the mechanism: provide no input to unset the instrument.
Example
# This can narrate: "This horn has the ponder_goat_horn instrument!"
- narrate "This horn has the <player.item_in_hand.instrument> instrument!"
Example
# Forces the player's held item to play seek_goat_horn instead of whatever it played before.
# Would break if the player isn't holding a goat horn.
- inventory adjust slot:hand instrument:seek_goat_horn
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemInstrument.java#L12
Name<ItemTag.inventory_contents>
ReturnsListTag(ItemTag)
MechanismItemTag.inventory_contents
Description(Property) A container item's inventory contents.
Generated Example
- foreach <player.item_in_hand.inventory_contents> as:entry:
    - narrate "found <[entry]>"
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemInventoryContents.java#L28
Name<ItemTag.invisible>
ReturnsElementTag(Boolean)
MechanismItemTag.invisible
DescriptionReturns whether an Item_Frame item will be invisible when placed.
Generated Example
- if <player.item_in_hand.invisible>:
    - narrate "it was true!"
- else:
    - narrate "it was false!"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemFrameInvisible.java#L58
Name<ItemTag.is_book>
ReturnsElementTag(Boolean)
DescriptionReturns whether the item is considered an editable book.
If this returns true, it will enable access to:
Mechanism:ItemTag.book,
Tag:ItemTag.book_author, Tag:ItemTag.book_title, and Tag:ItemTag.book_pages.
Generated Example
- if <player.item_in_hand.is_book>:
    - narrate "it was true!"
- else:
    - narrate "it was false!"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/ItemTag.java#L519
Name<ItemTag.is_charged>
ReturnsElementTag(Boolean)
MechanismItemTag.charged_projectiles
DescriptionReturns whether this crossbow is charged.
Generated Example
- if <player.item_in_hand.is_charged>:
    - narrate "it was true!"
- else:
    - narrate "it was false!"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemChargedProjectile.java#L63
Name<ItemTag.is_colorable>
ReturnsElementTag(Boolean)
DescriptionReturns whether the item can have a custom color.
If this returns true, it will enable access to:
Mechanism:ItemTag.color, and Tag:ItemTag.color.
Generated Example
- if <player.item_in_hand.is_colorable>:
    - narrate "it was true!"
- else:
    - narrate "it was false!"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/ItemTag.java#L533
Name<ItemTag.is_enchanted>
ReturnsElementTag(Boolean)
MechanismItemTag.enchantments
DescriptionReturns whether the item has any enchantments.
Generated Example
- if <player.item_in_hand.is_enchanted>:
    - narrate "it was true!"
- else:
    - narrate "it was false!"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemEnchantments.java#L59
Name<ItemTag.is_firework>
ReturnsElementTag(Boolean)
DescriptionReturns whether the item is a firework.
If this returns true, it will enable access to:
Mechanism:ItemTag.firework, and Tag:ItemTag.firework.
Generated Example
- if <player.item_in_hand.is_firework>:
    - narrate "it was true!"
- else:
    - narrate "it was false!"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/ItemTag.java#L550
Name<ItemTag.is_lockable>
ReturnsElementTag(Boolean)
DescriptionReturns whether the item is lockable.
If this returns true, it will enable access to:
Mechanism:ItemTag.lock, and Tag:ItemTag.lock.
Generated Example
- if <player.item_in_hand.is_lockable>:
    - narrate "it was true!"
- else:
    - narrate "it was false!"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/ItemTag.java#L576
Name<ItemTag.is_locked>
ReturnsElementTag(Boolean)
MechanismItemTag.lock
DescriptionReturns whether this item has a lock password.
Generated Example
- if <player.item_in_hand.is_locked>:
    - narrate "it was true!"
- else:
    - narrate "it was false!"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemLock.java#L74
Name<ItemTag.is_overridden[<component>]>
ReturnsElementTag(Boolean)
DescriptionReturns whether an item has a specific item component type overridden, see Language:Item Components.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/datacomponents/DataComponentAdapter.java#L80
Name<ItemTag.is_waxed>
ReturnsElementTag(Boolean)
MechanismItemTag.is_waxed
Description(Property) Returns whether a sign item is waxed (cannot be edited once placed).
Generated Example
- if <player.item_in_hand.is_waxed>:
    - narrate "it was true!"
- else:
    - narrate "it was false!"
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemSignIsWaxed.java#L13
Name<ItemTag.item_model>
ReturnsElementTag
MechanismItemTag.item_model
Description(Property) Returns an item's model Language:Item Components in namespaced key format.
The default namespace is "minecraft", so for example an input of "stone" becomes "minecraft:stone", and will set the item model to a stone block.
This can also be used to display item models from your own custom resource packs.
Generated Example
- narrate <player.item_in_hand.item_model>
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/datacomponents/ItemModelAdapter.java#L11
Name<ItemTag.json>
ReturnsElementTag
DescriptionReturns the item converted to a raw JSON object with one layer of escaping for network transmission.
EG, via /tellraw.
Generally, prefer tags like Tag:ElementTag.on_hover.type with type 'show_item'.
Generated Example
- narrate <player.item_in_hand.json>
Groupconversion
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/ItemTag.java#L630
Name<ItemTag.knowledge_book_recipes>
ReturnsListTag
MechanismItemTag.knowledge_book_recipes
DescriptionReturns a recipes unlocked by this knowledge book. Recipes are in the Namespace:Key format, for example "minecraft:gold_nugget".
These keys are not necessarily 1:1 with material names, as seen in the example "minecraft:gold_ingot_from_nuggets".
Generated Example
- foreach <player.item_in_hand.knowledge_book_recipes> as:entry:
    - narrate "found <[entry]>"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemKnowledgeBookRecipes.java#L63
Name<ItemTag.lock>
ReturnsElementTag
MechanismItemTag.lock
DescriptionReturns the lock password of this item.
Generated Example
- narrate <player.item_in_hand.lock>
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemLock.java#L59
Name<ItemTag.lodestone_location>
ReturnsLocationTag
MechanismItemTag.lodestone_location
DescriptionReturns the lodestone location this compass is pointing at (if any).
See also Tag:ItemTag.lodestone_tracked
Generated Example
- teleport <player> <player.item_in_hand.lodestone_location>
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemLodestoneLocation.java#L50
Name<ItemTag.lodestone_tracked>
ReturnsElementTag(Boolean)
MechanismItemTag.lodestone_tracked
DescriptionReturns whether the compass will track a lodestone. If "true", the compass will only work if there's a lodestone at the target location.
See also Tag:ItemTag.lodestone_location
Generated Example
- if <player.item_in_hand.lodestone_tracked>:
    - narrate "it was true!"
- else:
    - narrate "it was false!"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemLodestoneTracked.java#L49
Name<ItemTag.lore>
ReturnsListTag
MechanismItemTag.lore
DescriptionReturns lore as a ListTag.
Generated Example
- foreach <player.item_in_hand.lore> as:entry:
    - narrate "found <[entry]>"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemLore.java#L57
Name<ItemTag.map_center>
ReturnsLocationTag
MechanismItemTag.map_center
DescriptionReturns the center location on the map's display.
Note that there is no Y value (it's always 0), only X, Z, and a World.
Generated Example
- teleport <player> <player.item_in_hand.map_center>
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemMap.java#L99
Name<ItemTag.map_locked>
ReturnsElementTag(Boolean)
MechanismItemTag.map_locked
DescriptionReturns whether maps with the same ID as this map are locked.
Generated Example
- if <player.item_in_hand.map_locked>:
    - narrate "it was true!"
- else:
    - narrate "it was false!"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemMap.java#L80
Name<ItemTag.map_scale>
ReturnsElementTag(Number)
MechanismItemTag.map
DescriptionReturns the scale of the map, from 0 (smallest) to 4 (largest).
Generated Example
- narrate "the number value is <player.item_in_hand.map_scale>"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemMap.java#L61
Name<ItemTag.map_to_image[<player>]>
ReturnsImageTag
DescriptionReturns an image of a filled map item's contents.
Must specify a player for the map to render for, as if that player is holding the map.
Note that this does not include cursors, as their rendering is entirely client-side.
Generated Example
- draw id:artwork image:<player.item_in_hand.map_to_image[<player>]> x:5 y:5
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/ItemTag.java#L752
Name<ItemTag.map>
ReturnsElementTag(Number)
MechanismItemTag.map
DescriptionReturns the ID number of the map item's map.
Generated Example
- narrate "the number value is <player.item_in_hand.map>"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemMap.java#L46
Name<ItemTag.material>
ReturnsMaterialTag
MechanismItemTag.material
DescriptionReturns the MaterialTag that is the basis of the item.
EG, a stone with lore and a display name, etc. will return only "m@stone".
Generated Example
- modifyblock <player.location.below> <player.item_in_hand.material>
Groupconversion
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/ItemTag.java#L589
Name<ItemTag.max_durability>
ReturnsElementTag(Number)
MechanismItemTag.max_durability
Description(Property) Returns an item's max durability Language:Item Components.
Generated Example
- narrate "the number value is <player.item_in_hand.max_durability>"
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/datacomponents/MaxDurabilityAdapter.java#L9
Name<ItemTag.max_stack_size>
ReturnsElementTag(Number)
MechanismItemTag.max_stack_size
Description(Property) Returns an item's max stack size Language:Item Components.
Generated Example
- narrate "the number value is <player.item_in_hand.max_stack_size>"
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/datacomponents/MaxStackSizeAdapter.java#L9
Name<ItemTag.max_stack>
ReturnsElementTag(Number)
DescriptionReturns the max number of this item possible in a single stack of this type.
For use with Tag:ItemTag.quantity and Mechanism:ItemTag.quantity.
Generated Example
- narrate "the number value is <player.item_in_hand.max_stack>"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemQuantity.java#L66
Name<ItemTag.meta_type>
ReturnsElementTag
DescriptionReturns the name of the Bukkit item meta type that applies to this item.
This is for debugging purposes.
Generated Example
- narrate <player.item_in_hand.meta_type>
Groupconversion
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/ItemTag.java#L643
Name<ItemTag.patterns>
ReturnsListTag
MechanismItemTag.patterns
DescriptionLists a banner's patterns in the form "COLOR/PATTERN|COLOR/PATTERN" etc.
For the list of possible colors, see 🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/DyeColor.html.
For the list of possible patterns, see 🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/block/banner/PatternType.html.
Generated Example
- foreach <player.item_in_hand.patterns> as:entry:
    - narrate "found <[entry]>"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemPatterns.java#L112
Name<ItemTag.placed_material>
ReturnsMaterialTag
DescriptionReturns the MaterialTag that this item would place as a block, if it is a block-like item.
For example, the "redstone" item will return a "redstone_wire" block.
Returns null if the item doesn't place as a block.
Generated Example
- modifyblock <player.location.below> <player.item_in_hand.placed_material>
Groupconversion
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/ItemTag.java#L613
Name<ItemTag.potion_base_type>
ReturnsElementTag
MechanismItemTag.potion_effects
DescriptionDeprecated in favor of Tag:ItemTag.effects_data
Generated Example
- narrate <player.item_in_hand.potion_base_type>
Groupproperties
Deprecateduse 'effects_data.first.get[base_type]' instead
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemPotion.java#L324
Name<ItemTag.potion_base>
ReturnsElementTag
MechanismItemTag.potion_effects
DescriptionDeprecated in favor of Tag:ItemTag.effects_data
Generated Example
- narrate <player.item_in_hand.potion_base>
Groupattribute
Deprecateduse 'effects_data' instead
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemPotion.java#L342
Name<ItemTag.potion_effect[<#>]>
ReturnsElementTag
MechanismItemTag.potion_effects
DescriptionDeprecated in favor of Tag:ItemTag.effects_data
Generated Example
- narrate <player.item_in_hand.potion_effect[4]>
Groupattribute
Deprecateduse 'effects_data' instead
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemPotion.java#L380
Name<ItemTag.potion_effects>
ReturnsListTag
MechanismItemTag.potion_effects
DescriptionDeprecated in favor of Tag:ItemTag.effects_data
Generated Example
- foreach <player.item_in_hand.potion_effects> as:entry:
    - narrate "found <[entry]>"
Groupattribute
Deprecateduse 'effects_data' instead
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemPotion.java#L363
Name<ItemTag.quantity>
ReturnsElementTag(Number)
MechanismItemTag.quantity
DescriptionReturns the number of items in the ItemTag's itemstack.
Generated Example
- narrate "the number value is <player.item_in_hand.quantity>"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemQuantity.java#L48
Name<ItemTag.rarity>
ReturnsElementTag
MechanismItemTag.rarity
Description(Property) Returns an item's rarity Language:Item Components.
See 🔗https://jd.papermc.io/paper/org/bukkit/inventory/ItemRarity.html for valid rarity values.
Generated Example
- narrate <player.item_in_hand.rarity>
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/datacomponents/RarityAdapter.java#L10
Name<ItemTag.raw_nbt>
ReturnsMapTag
MechanismItemTag.raw_nbt
DescriptionReturns a map of all non-default raw NBT on this item.
Refer to format details at Language:Raw NBT Encoding.
Deprecated in favor of Tag:ItemTag.custom_data on MC 1.20+.
Generated Example
- foreach <player.item_in_hand.raw_nbt> key:key as:val:
    - narrate "<[key]> is set as <[val]>"
Deprecateduse 'ItemTag.custom_data'
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemRawNBT.java#L360
Name<ItemTag.recipe_ids[(<type>)]>
ReturnsListTag
DescriptionIf the item is a scripted item, returns a list of all recipe IDs created by the item script.
Others, returns a list of all recipe IDs that the server lists as capable of crafting the item.
Returns a list in the Namespace:Key format, for example "minecraft:gold_nugget".
Optionally, specify a recipe type (CRAFTING, FURNACE, COOKING, BLASTING, SHAPED, SHAPELESS, SMOKING, STONECUTTING, BREWING)
to limit to just recipes of that type.
Brewing recipes are only supported on Paper, and only custom ones are available.
Generated Example
- foreach <player.item_in_hand.recipe_ids> as:entry:
    - narrate "found <[entry]>"
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/ItemTag.java#L679
Name<ItemTag.removed_components>
ReturnsListTag
MechanismItemTag.removed_components
Description(Property) Returns the item components explicitly removed from an item.
This can be used to remove item's default behavior, such as making consumable items non-consumable.
Alternatively, use Mechanism:ItemTag.remove_component to remove a single component.
See Language:Item Components for more information.
Generated Example
- foreach <player.item_in_hand.removed_components> as:entry:
    - narrate "found <[entry]>"
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/properties/ItemRemovedComponents.java#L14
Name<ItemTag.repair_cost>
ReturnsElementTag(Number)
MechanismItemTag.repair_cost
DescriptionReturns the current repair cost (on an anvil) for this item.
Note that zero indicates no repair cost.
Generated Example
- narrate "the number value is <player.item_in_hand.repair_cost>"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemRepairCost.java#L49
Name<ItemTag.repairable>
ReturnsElementTag(Boolean)
DescriptionReturns whether the item can be repaired.
If this returns true, it will enable access to:
Mechanism:ItemTag.durability,
Tag:ItemTag.max_durability, and Tag:ItemTag.durability.
Note that due to odd design choices in Spigot, this is effectively true for all items, even though the durability value of most items is locked at zero.
Generated Example
- if <player.item_in_hand.repairable>:
    - narrate "it was true!"
- else:
    - narrate "it was false!"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/ItemTag.java#L504
Name<ItemTag.script>
ReturnsScriptTag
DescriptionReturns the script of the item if it was created by an item script.
Generated Example
- narrate <player.item_in_hand.script>
Groupscripts
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemScript.java#L74
Name<ItemTag.scriptname>
ReturnsElementTag
DescriptionUse ".script.name" instead.
This deprecated tag may be useful for debugging items when item scripts may have been deleted.
Generated Example
- narrate <player.item_in_hand.scriptname>
Groupdata
Deprecateduse ".script.name" instead.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemScript.java#L57
Name<ItemTag.sign_contents>
ReturnsListTag
MechanismItemTag.sign_contents
DescriptionReturns a list of lines on a sign item.
Generated Example
- foreach <player.item_in_hand.sign_contents> as:entry:
    - narrate "found <[entry]>"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemSignContents.java#L59
Name<ItemTag.simple>
ReturnsElementTag
DescriptionReturns a simple reusable item identification for this item, with minimal extra data.
Generated Example
- narrate <player.item_in_hand.simple>
Groupconversion
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/ItemTag.java#L668
Name<ItemTag.skin>
ReturnsElementTag
MechanismItemTag.skull_skin
DescriptionReturns the UUID of the player whose skin a skull item uses.
Note: Item must be a 'player_head' with a skin.
In format: UUID|Texture|Name.
See also Language:Player Entity Skins (Skin Blobs).
Generated Example
- narrate <player.item_in_hand.skin>
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemSkullskin.java#L75
Name<ItemTag.skull_skin>
ReturnsElementTag
MechanismItemTag.skull_skin
DescriptionReturns the UUID of the player whose skin a skull item uses.
Note: Item must be a 'player_head' with a skin.
In format: UUID|Texture|Name.
See also Language:Player Entity Skins (Skin Blobs).
Generated Example
- narrate <player.item_in_hand.skull_skin>
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemSkullskin.java#L56
Name<ItemTag.spawner_count>
ReturnsElementTag(Number)
MechanismItemTag.spawner_count
DescriptionReturns the spawn count for a spawner block item.
Generated Example
- narrate "the number value is <player.item_in_hand.spawner_count>"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemSpawnerCount.java#L50
Name<ItemTag.spawner_max_nearby_entities>
ReturnsElementTag(Number)
MechanismItemTag.spawner_max_nearby_entities
DescriptionReturns the maximum nearby entities for a spawner block item.
Generated Example
- narrate "the number value is <player.item_in_hand.spawner_max_nearby_entities>"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemSpawnerMaxNearbyEntities.java#L50
Name<ItemTag.spawner_maximum_spawn_delay>
ReturnsElementTag(Number)
MechanismItemTag.spawner_delay_data
DescriptionReturns the maximum spawn delay for a spawner block item.
Generated Example
- narrate "the number value is <player.item_in_hand.spawner_maximum_spawn_delay>"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemSpawnerDelay.java#L82
Name<ItemTag.spawner_minimum_spawn_delay>
ReturnsElementTag(Number)
MechanismItemTag.spawner_delay_data
DescriptionReturns the minimum spawn delay for a spawner block item.
Generated Example
- narrate "the number value is <player.item_in_hand.spawner_minimum_spawn_delay>"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemSpawnerDelay.java#L67
Name<ItemTag.spawner_player_range>
ReturnsElementTag(Number)
MechanismItemTag.spawner_player_range
DescriptionReturns the maximum player range for a spawner block item (ie how close a player must be for this spawner to be active).
Generated Example
- narrate "the number value is <player.item_in_hand.spawner_player_range>"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemSpawnerPlayerRange.java#L50
Name<ItemTag.spawner_range>
ReturnsElementTag(Number)
MechanismItemTag.spawner_range
DescriptionReturns the spawn range for a spawner block item (the radius mobs will spawn in).
Generated Example
- narrate "the number value is <player.item_in_hand.spawner_range>"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemSpawnerRange.java#L50
Name<ItemTag.spawner_spawn_delay>
ReturnsElementTag(Number)
MechanismItemTag.spawner_delay_data
DescriptionReturns the current spawn delay for a spawner block item.
This changes over time between Tag:ItemTag.spawner_minimum_spawn_delay and Tag:ItemTag.spawner_maximum_spawn_delay.
Generated Example
- narrate "the number value is <player.item_in_hand.spawner_spawn_delay>"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemSpawnerDelay.java#L51
Name<ItemTag.spawner_type>
ReturnsEntityTag
MechanismItemTag.spawner_type
Description(Property) The entity type a spawner item will spawn, if any.
For the mechanism: provide no input to unset the type.
Note that the type can only be unset on 1.20 and above.
Generated Example
- heal <player.item_in_hand.spawner_type>
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemSpawnerType.java#L14
Name<ItemTag.trim>
ReturnsMapTag
MechanismItemTag.trim
Description(Property) An armor item's trim.
Allowed keys: material, pattern.
Valid material values can be found here: 🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/meta/trim/TrimMaterial.html
Valid pattern values can be found here: 🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/meta/trim/TrimPattern.html
Valid values also include ones added by datapacks, plugins, etc. as a namespaced key.
For the mechanism, if an item already has a trim, you can omit either material or pattern to keep the original data while also changing the other option.
For example, if you only want to change the pattern and not the material, you can omit the material, and it will use the already existing material.
Generated Example
- foreach <player.item_in_hand.trim> key:key as:val:
    - narrate "<[key]> is set as <[val]>"
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemTrim.java#L16
Name<ItemTag.unbreakable>
ReturnsElementTag(Boolean)
MechanismItemTag.unbreakable
DescriptionReturns whether an item has the unbreakable flag.
Generated Example
- if <player.item_in_hand.unbreakable>:
    - narrate "it was true!"
- else:
    - narrate "it was false!"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemUnbreakable.java#L44
Name<ItemTag.with_flag[<flag_set_action>].duration[<expire_duration>]>
ReturnsItemTag
MechanismItemTag.flag
DescriptionReturns a copy of the item with the specified flag data action (and the specified expiration duration) applied to it.
For example: <[item].with_flag[myflagname].duration[5m]>
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemFlags.java#L68
Name<ItemTag.with_flag[<flag_set_action>]>
ReturnsItemTag
MechanismItemTag.flag
DescriptionReturns a copy of the item with the specified flag data action applied to it.
For example: <[item].with_flag[myflagname]>, or <[item].with_flag[myflag:myvalue]>, or <[item].with_flag[mycounter:+:<[amount]>]>
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemFlags.java#L53
Name<ItemTag.worth.quantity[<#>]>
ReturnsElementTag(Decimal)
DescriptionDeprecated in favor of Tag:ItemTag.essentials_worth.
RequiresDepenizen, Essentials
DeprecatedUse 'ItemTag.essentials_worth.mul[<#>]'
Sourcehttps://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/properties/essentials/EssentialsItemExtensions.java#L50
Name<ItemTag.worth>
ReturnsElementTag(Decimal)
MechanismItemTag.essentials_worth
DescriptionDeprecated in favor of Tag:ItemTag.essentials_worth.
Generated Example
- narrate "the decimal value is <player.item_in_hand.worth>"
RequiresDepenizen, Essentials
DeprecatedUse 'ItemTag.essentials_worth'
Sourcehttps://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/properties/essentials/EssentialsItemExtensions.java#L33
Name<ListTag.get_sub_items[<#>].split_by[<element>]>
ReturnsListTag
DescriptionReturns a list of the specified sub item in the list, allowing you to specify a
character in which to split the sub items by. WARNING: When setting your own split
character, make note that it is CASE SENSITIVE.
Example
# Narrates a list of "one|two"
- narrate <list[one-alpha|two-beta].get_sub_items[1].split_by[-]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L862
Name<ListTag.get_sub_items[<#>]>
ReturnsListTag
DescriptionReturns a list of the specified sub items in the list, as split by the
forward-slash character (/).
Example
# Narrates a list of "one|two"
- narrate <list[one/alpha|two/beta].get_sub_items[1]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L846
Name<LocationTag.buried_item>
ReturnsItemTag
MechanismLocationTag.buried_item
DescriptionReturns the item buried in a brushable block (also referred to as "suspicious blocks"). Returns air if there is no item buried.
Generated Example
- give <player.location.buried_item>
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L4422
Name<LocationTag.campfire_items>
ReturnsListTag(ItemTag)
MechanismLocationTag.campfire_items
DescriptionReturns a list of items currently in this campfire.
This list has air items in empty slots, and is always sized exactly the same as the number of spaces a campfire has.
(A standard campfire has exactly 4 slots).
Generated Example
- foreach <player.location.campfire_items> as:entry:
    - narrate "found <[entry]>"
Groupworld
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L4113
Name<LocationTag.drops[(<item>)]>
ReturnsListTag(ItemTag)
DescriptionReturns what items the block at the location would drop if broken naturally.
Optionally specifier a breaker item.
Not guaranteed to contain exactly correct or contain all possible drops (for things like plants that drop only when grown, ores that drop random amounts, etc).
Generated Example
- foreach <player.location.drops> as:entry:
    - narrate "found <[entry]>"
Groupworld
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L1443
Name<LocationTag.xp_drop[(<item>)]>
ReturnsElementTag(Number)
DescriptionReturns how much experience, if any, the block at the location would drop if broken naturally.
Returns 0 if a block wouldn't drop xp.
Optionally specifier a breaker item.
Not guaranteed to contain exactly the amount that actual drops if then broken later, as the value is usually randomized.
Generated Example
- narrate "the number value is <player.location.xp_drop>"
Groupworld
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L1464
Name<MaterialTag.is_item>
ReturnsElementTag(Boolean)
DescriptionReturns whether the material is a holdable item.
Note that most blocks are valid items as well.
This only returns "false" for certain non-holdable "special" blocks, like Fire.
Generated Example
- if <material[stone].is_item>:
    - narrate "it was true!"
- else:
    - narrate "it was false!"
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/MaterialTag.java#L352
Name<MaterialTag.item>
ReturnsItemTag
DescriptionReturns an item of the material. Not all materials can be items.
Generated Example
- give <material[stone].item>
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/MaterialTag.java#L544
Name<mythic_item[<name>]>
ReturnsItemTag
DescriptionReturns an ItemTag of the named mythic item.
RequiresDepenizen, MythicMobs
Sourcehttps://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/bridges/MythicMobsBridge.java#L94
Name<PlayerTag.held_item_slot>
ReturnsElementTag(Number)
DescriptionReturns the slot location of the player's selected item.
Generated Example
- narrate "the number value is <player.held_item_slot>"
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L1604
Name<PlayerTag.item_cooldown[<material>]>
ReturnsDurationTag
DescriptionReturns the cooldown duration remaining on player's material.
Generated Example
- flag server myflag expire:<player.item_cooldown[dirt]>
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L869
Name<PlayerTag.item_on_cursor>
ReturnsItemTag
MechanismPlayerTag.item_on_cursor
DescriptionReturns the item on the player's cursor, if any. This includes
chest interfaces, inventories, and hotbars, etc.
Generated Example
- give <player.item_on_cursor>
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L1592
Name<PlayerTag.skull_item>
ReturnsItemTag
DescriptionReturns a Player_Head item with the skin of the player.
See also Language:Player Entity Skins (Skin Blobs).
Generated Example
- give <player.skull_item>
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L1733
Name<PlayerTag.we_brush_info[(<item>)]>
ReturnsListTag
DescriptionReturns information about a player's current brush for an item.
If no item is specified, will be based on their held item.
Output is in format: type|size|range|material

Note that some values may be listed as "unknown" or strange values due to WorldEdit having a messy API (no way to automatically stringify brush data).
Generated Example
- foreach <player.we_brush_info> as:entry:
    - narrate "found <[entry]>"
RequiresDepenizen, WorldEdit
Sourcehttps://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/properties/worldedit/WorldEditPlayerProperties.java#L81
Name<server.parse_bukkit_item[<serial>]>
ReturnsItemTag
DescriptionReturns the ItemTag resultant from parsing Bukkit item serialization data (under subkey "item").
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L176
Name<server.recipe_items[<id>]>
ReturnsListTag(ItemTag)
DescriptionReturns a list of the items used as input to the recipe within the input ID.
This is formatted equivalently to the item script recipe input, with "material:" for non-exact matches, and a full ItemTag for exact matches.
Note that this won't represent all recipes perfectly (primarily those with multiple input choices per slot).
Brewing recipes are only supported on Paper, and only custom ones are available.
For brewing recipes, currently "matcher:<item matcher>" input options are only supported in recipes added by Denizen.
For furnace-style and stonecutting recipes, this will return a list with only 1 item.
For shaped recipes, this will include 'air' for slots that are part of the shape but don't require an item.
For smithing recipes, this will return a list with the 'base' item and the 'addition'.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L227

Partial Synonym Match Results


Name<FlaggableObject.flag_expiration[<flag_name>]>
ReturnsTimeTag
DescriptionReturns a TimeTag indicating when the specified flag will expire.
See Language:flag system.
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/flags/AbstractFlagTracker.java#L71
Name<FlaggableObject.flag_map[<name>|...]>
ReturnsMapTag
DescriptionReturns a raw map of the objects internal flag data for the flags with the given flag name. Names must be root names (no '.').
Output is a MapTag wherein each key is a flag name, and each value is a MapTag, containing keys '__value' and '__expiration', where '__value' contains the real object value.
Output also may contain key '__clear', which is a ListTag of flags that were listed in input but weren't present in output.
Using this without a parameter to get ALL flags is allowed exclusively for debug/testing reasons, and should never be used in a real script.
See Language:flag system.
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/flags/AbstractFlagTracker.java#L104
Name<FlaggableObject.flag[<flag_name>]>
ReturnsObjectTag
DescriptionReturns the specified flag from the flaggable object.
If the flag is expired, will return null.
Consider also using Tag:FlaggableObject.has_flag.
See Language:flag system.
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/flags/AbstractFlagTracker.java#L37
Name<FlaggableObject.has_flag[<flag_name>]>
ReturnsElementTag(Boolean)
DescriptionReturns true if the flaggable object has the specified flag, otherwise returns false.
See Language:flag system.
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/flags/AbstractFlagTracker.java#L55
Name<FlaggableObject.list_flags>
ReturnsListTag
DescriptionReturns a list of the flaggable object's flags.
Note that this is exclusively for debug/testing reasons, and should never be used in a real script.
See Language:flag system.
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/flags/AbstractFlagTracker.java#L87
Name<PropertyHolderObject.property_map>
ReturnsMapTag
DescriptionReturns the object's property map.
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/properties/PropertyParser.java#L560
Name<PropertyHolderObject.supports[<property-name>]>
ReturnsElementTag(Boolean)
DescriptionReturns true if the property named is supported by the object.
This does not necessarily mean it has a valid current value, just that it's supported at all.
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/properties/PropertyParser.java#L536
Name<PropertyHolderObject.with_map[<property-map>]>
ReturnsPropertyHolderObject
DescriptionReturns a copy of the object with the MapTag of mechanism adjustments applied.
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/properties/PropertyParser.java#L513
Name<PropertyHolderObject.with_single[<mechanism>=<value>]>
ReturnsPropertyHolderObject
DescriptionReturns a copy of the object with a single mechanism adjustment applied.
This avoids the risk of escaping issues.
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/properties/PropertyParser.java#L490
Name<PropertyHolderObject.with[<mechanism>=<value>;...]>
ReturnsPropertyHolderObject
DescriptionReturns a copy of the object with mechanism adjustments applied.
Be careful with dynamic inputs, they may break from escaping flaws.
Consider using Tag:PropertyHolderObject.with_single instead.
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/properties/PropertyParser.java#L463

Strong Match Results



Command


NameGive
Syntaxgive [<item>|...] (quantity:<#>) (unlimit_stack_size) (to:<inventory>) (slot:<slot>) (allowed_slots:<slot-matcher>) (ignore_leftovers)
Short DescriptionGives the player an item or xp.
Full DescriptionGives the linked player items.

Optionally specify a slot to put the items into. If the slot is already filled, the next available slot will be used.
If the inventory is full, the items will be dropped on the ground at the inventory's location.
For player inventories, only the storage contents are valid - to equip armor or an offhand item, use Command:equip.

Specifying "unlimit_stack_size" will allow an item to stack up to 64. This is useful for stacking items
with a max stack size that is less than 64 (for example, most weapon and armor items have a stack size of 1).

When giving an item, you can specify any valid inventory as a target. If unspecified, the linked player's inventory will be used.
You may optionally specify a "slot" as any valid slot input per Language:Slot Inputs to be the starting slot index.
You may optionally specify "allowed_slots" to forcibly restrict the item to only be given to certain specific slots that match a slot-matcher.
You may optionally specify "ignore_leftovers" to cause leftover items to be ignored. If not specified, leftover items will be dropped.

To give xp to a player, use Command:experience.
To give money to a player, use Command:money.
Related Tags<PlayerTag.inventory> Returns a InventoryTag of the player's current inventory. (...)
<entry[saveName].leftover_items> returns a ListTag of any item(s) that didn't fit into the inventory.
Usage Example
# Use to give an item to the player.
- give iron_sword
Usage Example
# Use to give an item and place it in a specific slot if possible.
- give WATCH slot:5
Usage Example
# Use to give an item to some other defined player.
- give diamond player:<[target]>
Groupitem
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/item/GiveCommand.java#L31
NameInventory
Syntaxinventory [open/close/copy/move/swap/set/keep/exclude/fill/clear/update/adjust <mechanism>:<value>/flag <name>(:<action>)[:<value>] (expire:<time>)] (destination:<inventory>) (origin:<inventory>/<item>|...) (slot:<slot>)
Short DescriptionEdits the inventory of a player, NPC, or chest.
Full DescriptionUse this command to edit the state of inventories.
By default, the destination inventory is the current attached player's inventory.

If you are copying, swapping, removing from (including via "keep" and "exclude"), adding to, moving, or filling inventories,
you'll need both destination and origin inventories.

Origin inventories may be specified as a list of ItemTags, but destinations must be actual InventoryTags.

Using "open", "clear", or "update" only require a destination.
"Update" also requires the destination to be a valid player inventory.

Using "close" closes any inventory that the currently attached player has opened.

The "adjust" option adjusts mechanisms on an item within a specific slot of an inventory (the "slot" parameter is required).
Note that this is only for items, it does NOT adjust the inventory itself. Use Command:adjust to adjust an inventory mechanism.

The "flag" option sets a flag on items, similar to Command:flag.
See also Language:flag system.

The "update" option will refresh the client's view of an inventory to match the server's view, which is useful to workaround some sync bugs.

Note that to add items to an inventory, you should usually use Command:give,
and to remove items from an inventory, you should usually use Command:take.

The slot argument can be any valid slot, see Language:Slot Inputs.
Related Tags<PlayerTag.inventory> Returns a InventoryTag of the player's current inventory. (...)
<PlayerTag.enderchest> Gets the player's enderchest inventory. (...)
<PlayerTag.open_inventory> Gets the inventory the player currently has open. If the player has no open (...)
<NPCTag.inventory> Returns the InventoryTag of the NPC.
<LocationTag.inventory> Returns the InventoryTag of the block at the location. If the (...)
Usage Example
# Use to open a chest inventory, at a location.
- inventory open d:<context.location>
Usage Example
# Use to open a virtual inventory with a title and some items.
- inventory open d:generic[size=27;title=BestInventory;contents=snowball|stick]
Usage Example
# Use to open another player's inventory.
- inventory open d:<[player].inventory>
Usage Example
# Use to remove all items from a chest, except any items in the specified list.
- inventory keep d:<context.location.inventory> o:snowball|ItemScript
Usage Example
# Use to remove all sticks and stones from the player's inventory.
- inventory exclude origin:stick|stone
Usage Example
# Use to clear the player's inventory entirely.
- inventory clear
Usage Example
# Use to swap two players' inventories.
- inventory swap d:<[playerOne].inventory> o:<[playerTwo].inventory>
Usage Example
# Use to adjust a specific item in the player's inventory.
- inventory adjust slot:5 "lore:Item modified!"
Usage Example
# Use to set a single stick into slot 10 of the player's inventory.
- inventory set o:stick slot:10
Usage Example
# Use to set a temporary flag on the player's held item.
- inventory flag slot:hand my_target:<player.cursor_on> expire:1d
Groupitem
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/item/InventoryCommand.java#L105
NameMap
Syntaxmap [<#>/new:<world>] (reset:<location>/reset_to_blank) (scale:<value>) (tracking) (image:<file>) (resize) (script:<script>) (dot:<color>) (radius:<#>) (x:<#>) (y:<#>) (text:<text>) (width:<#>) (height:<#>)
Short DescriptionModifies a new or existing map by adding images or text.
Full DescriptionThis command modifies an existing map, or creates a new one. Using this will override existing non-Denizen map renderers with Denizen's custom map renderer.

You must specify at least one of 'reset', 'reset_to_blank', 'script', 'image', 'dot', 'text'. You can specify multiple at once if you prefer.

When using 'reset' or 'reset_to_blank', you can specify optionally 'scale' and/or 'tracking'.
When using 'image' you can optionally specify 'resize' or 'width:<#>' and 'height:<#>'.
When using 'dot', you can specify any valid ColorTag (it will be compressed to map's color space), and you can optionally also specify 'radius' as a number.
Use "radius:0" with dot to set on a single pixel. 1 or higher will make a circle centered on the x/y given.

You can reset this at any time by using the 'reset:<location>' argument, which will remove all
images and texts on the map and show the default world map at the specified location.
You can also specify 'reset_to_blank' to reset without specified location.

The 'scale' argument takes input of one of the values listed here:
🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/map/MapView.Scale.html

The 'tracking' argument determines if the map will track its location on the map it displays.
This is often the player holding the map's location.

Note that all maps have a size of 128x128.

The file path is relative to the 'plugins/Denizen/images/' folder.
Instead of a local file path, an http(s) URL can be used, which will automatically download the image from the URL given.
If the file path points to a .gif, the map will automatically be animated.

Use escaping to let the image and text arguments have tags based on the player viewing the map.

Custom maps will persist over restarts using the 'maps.yml' save file in the Denizen plugins folder.
Related Tags<entry[saveName].created_map> returns the map created by the 'new:' argument if used.
Usage Example
# Use to add an auto-resized background image to map 3.
- map 3 image:my_map_images/my_background.png resize
Usage Example
# Use to add an image with the top-left corner at the center of a new map.
- map new:WorldTag image:my_map_images/my_center_image.png x:64 y:64 save:map
- give filled_map[map=<entry[map].created_map>]
Usage Example
# Use to reset map 3 to be centered at the player's location.
- map 3 reset:<player.location>
Usage Example
# Use to remove any custom renderers on map 3 and then apply the contents of the named <@link language Map Script Containers> to map 3.
- map 3 script:Map_Script_Name
Groupitem
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/item/MapCommand.java#L30
NameTake
Syntaxtake [iteminhand/cursoritem/bydisplay:<name>/bycover:<title>|<author>/slot:<slot>/flagged:<flag>/item:<matcher>] (quantity:<#>) (from:<inventory>)
Short DescriptionTakes an item from the player.
Full DescriptionTakes items from a player or inventory.

If the player or inventory does not have the item being taken, nothing happens.

Using 'slot:' will take the items from that specific slot.

Using 'flagged:' with a flag name will take items with the specified flag name, see Language:flag system.

Using 'iteminhand' will take from the player's held item slot.

Using 'cursoritem' will take from the player's held cursor item (as in, one that's actively being picked up and moved in an inventory screen).

Using 'bydisplay:' will take items with the specified display name.

Using 'bycover:' will take a written book by the specified book title + author pair.

Using 'raw_exact:' (Intentionally undocumented) will compare all raw details of an item exactly. This is almost always a bad idea to use. DO NOT USE.

Using 'item:' will take items that match an advanced item matcher, using the system behind Language:Advanced Object Matching.

Flagged, Slot, ByDisplay, and Raw_Exact, all take a list as input to take multiple different item types at once.

If no quantity is specified, exactly 1 item will be taken.

Specifying a raw item without any matching method is considered unreliable and should be avoided.

Optionally using 'from:' to specify a specific inventory to take from. If not specified, the linked player's inventory will be used.

The options 'iteminhand' and 'cursoritem' require a linked player and will ignore the 'from:' inventory.

To take xp from a player, use Command:experience.
To take money from a player, use Command:money.
Related Tags<PlayerTag.item_in_hand> Returns the item the entity is holding, or air if none.
Usage Example
# Use to take an arrow from the player's enderchest
- take item:arrow from:<player.enderchest>
Usage Example
# Use to take the current holding item from the player's hand
- take iteminhand
Usage Example
# Use to take 5 emeralds from the player's inventory
- take item:emerald quantity:5
Groupitem
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/item/TakeCommand.java#L41

Semi-Strong Match Results


NameDrop
Syntaxdrop [<entity_type>/xp/<item>|...] (<location>) (quantity:<#>) (speed:<#.#>) (delay:<duration>)
Short DescriptionDrops an item, entity, or experience orb on a location.
Full DescriptionTo drop an item, just specify a valid item object. To drop an entity, specify a generic entity object.
Drop can also reward players with experience orbs by using the 'xp' argument.

For all three usages, you can optionally specify an integer with 'quantity:' prefix to drop multiple items/entities/xp.

For items, you can add 'speed:' to modify the launch velocity.
You can also add 'delay:' to set the pickup delay of the item.
Related Tags<entry[saveName].dropped_entities> returns a list of entities that were dropped.
<entry[saveName].dropped_entity> returns a single entity that was dropped (if only one).
<EntityTag.item> (Property) An entity's item, which can be: (...)
<EntityTag.experience> Returns the experience value of this experience orb entity.
Usage Example
# Use to drop some loot around the player.
- drop gold_nugget <cuboid[<player.location.add[-2,-2,-2]>|<player.location.add[2,2,2]>].spawnable_blocks.random>
Usage Example
# Use to reward a player with 500 xp.
- drop xp quantity:500 <player.location>
Usage Example
# Use to drop a nasty surprise (exploding TNT).
- drop primed_tnt <player.location>
Usage Example
# Use to drop an item with a pickup delay at the player's location.
- drop diamond_sword <player.location> delay:20s
Groupworld
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/world/DropCommand.java#L34
NameEquip
Syntaxequip (<entity>|...) (hand:<item>) (offhand:<item>) (head:<item>) (chest:<item>) (legs:<item>) (boots:<item>) (saddle:<item>) (body:<item>)
Short DescriptionEquips items and armor on a list of entities.
Full DescriptionThis command equips an item or armor to an entity or list of entities to the specified slot(s).
Set the item to 'air' to unequip any slot.
Related Tags<EntityTag.equipment> Deprecated in favor of Tag:EntityTag.equipment_map.
<InventoryTag.equipment> Returns the equipment of an inventory as a list of items. (...)
Usage Example
# Use to equip a stone block on the player's head.
- equip <player> head:stone
Usage Example
# Use to equip an iron helmet on two defined players.
- equip <[player]>|<[someplayer]> head:iron_helmet
Usage Example
# Use to unequip all armor off the player.
- equip <player> head:air chest:air legs:air boots:air
Usage Example
# Use to equip a saddle on the horse the player is riding.
- equip <player.vehicle> saddle:saddle
Usage Example
# Use to equip a saddle on all nearby pigs.
- equip <player.location.find_entities[pig].within[10]> saddle:saddle
Usage Example
# Use to equip a horse with iron horse armor.
- equip <[horse]> body:iron_horse_armor
Groupentity
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/EquipCommand.java#L34
NameFakeEquip
Syntaxfakeequip [<entity>|...] (for:<player>|...) (duration:<duration>/reset) (hand:<item>) (offhand:<item>) (head:<item>) (chest:<item>) (legs:<item>) (boots:<item>)
Short DescriptionFake-equips items and armor on a list of entities for players to see without real change.
Full DescriptionThis command fake-equips items and armor on a list of entities.

The change doesn't happen on-server, and no armor effects will happen from it.

The equipment can only be seen by certain players. By default, the linked player is used.

The changes will remain in place for as long as the duration is specified (even if the real equipment is changed).
The changes can be manually reset early by using the 'reset' argument.
If you do not provide a duration, the fake equipment will last until manually reset.
This does not persist across server restarts.

Set the item to 'air' to unequip any slot.
Related Tags<EntityTag.equipment> Deprecated in favor of Tag:EntityTag.equipment_map.
<InventoryTag.equipment> Returns the equipment of an inventory as a list of items. (...)
Usage Example
# Use to fake-equip a stone block on the player's head.
- fakeequip <player> head:stone duration:10s
Usage Example
# Use to fake-equip an iron helmet on two defined players.
- fakeequip <[player]>|<[someplayer]> head:iron_helmet duration:1m
Usage Example
# Use to fake-unequip all armor off the player.
- fakeequip <player> head:air chest:air legs:air boots:air duration:5s
Usage Example
# Use to make all players within 30 blocks of an entity see it permanently equip a shield.
- fakeequip <[entity]> offhand:shield for:<[entity].find_players_within[30]> duration:0
Groupentity
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/FakeEquipCommand.java#L34
NameForeach
Related Guide Pagehttps://guide.denizenscript.com/guides/basics/loops.html
Syntaxforeach [stop/next/<object>|...] (as:<name>) (key:<name>) [<commands>]
Short DescriptionLoops through a ListTag, running a set of commands for each item.
Full DescriptionLoops through a ListTag of any type. For each item in the ListTag, the specified commands will be ran for that list entry.

Alternately, specify a map tag to loop over the set of key/value pairs in the map, where the key will be <[key]> and the value will be <[value]>.
Specify "key:<name>" to set the key definition name (if unset, will be "key").

Specify "as:<name>" to set the value definition name (if unset, will be "value").
Use "as:__player" to change the queue's player link, or "as:__npc" to change the queue's NPC link.
Note that a changed player/NPC link persists after the end of the loop.

To end a foreach loop, do - foreach stop

To jump immediately to the next entry in the loop, do - foreach next

Note that many commands and tags in Denizen support inputting a list directly, making foreach redundant for many simpler cases.

Note that if you delay the queue (such as with Command:wait or Language:~waitable) inside a foreach loop,
the loop can't process the next entry until the delay is over.
This can lead to very long waits if you have a long list and a wait directly in the loop, as the total delay is effectively multiplied by the number of iterations.
Use Command:run if you want to run logic simultaneously for many entries in a list in a way that allows them to separately wait without delaying each other.
Related Tags<[value]> to get the current item in the loop
<[loop_index]> to get the current loop iteration number
Usage Example
# Use to run commands 'for each entry' in a manually created list of objects/elements.
- foreach <[some_entity]>|<[some_npc]>|<[player]> as:entity:
    - announce "There's something at <[entity].location>!"
Usage Example
# Use to iterate through entries in any tag that returns a list.
- foreach <player.location.find_entities[zombie].within[50]> as:zombie:
    - narrate "There's a zombie <[zombie].location.distance[<player.location>].round> blocks away"
Usage Example
# Use to iterate through a list of players and run commands automatically linked to each player in that list.
- foreach <server.online_players> as:__player:
    - narrate "Thanks for coming to our server, <player.name>! Here's a bonus $50.00!"
    - money give quantity:50
Groupqueue
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/queue/ForeachCommand.java#L31

Event


Nameentity breaks hanging because cause
Event Lines <entity> breaks <hanging> (because <cause>)
Triggerswhen a hanging entity (painting, item_frame, or leash_hitch) is broken.
Generated Exampleson animal breaks hanging because cause:
on illusioner breaks hanging because cause:
Has Playerwhen the breaker is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Has NPCwhen 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.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupEntity
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityBreaksHangingScriptEvent.java#L19
Namehanging breaks because cause
Event Lines <hanging> breaks (because <cause>)
Triggerswhen a hanging entity (painting, item_frame, or leash_hitch) is broken.
Generated Examplesafter hanging breaks because cause:
on hanging breaks because cause:
Contexts<context.cause> returns the cause of the entity breaking. Causes: 🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/hanging/HangingBreakEvent.RemoveCause.html.
<context.entity> returns the EntityTag that broke the hanging entity, if any.
<context.hanging> returns the EntityTag of the hanging.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupEntity
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/HangingBreaksScriptEvent.java#L16
Nameloot dispenses from block
Event Lines loot dispenses from <block>
Triggerswhen a block dispenses loot containing multiple items.
Generated Exampleson loot dispenses from cut_copper:
after loot dispenses from cherry_stairs:
Has Playerwhen the loot dispensing is triggered by a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Contexts<context.loot> returns a ListTag(ItemTag) of loot items.
<context.location> returns a LocationTag of the block that is dispensing the items.
Determine"LOOT:<ListTag(ItemTag)>" to set the loot items being dispensed.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupBlock
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/block/LootDispensesFromBlockScriptEvent.java#L19
Nameplayer discovers recipe
Event Lines player discovers recipe
Triggerswhen a player discovers a new item in the recipe book.
Generated Exampleson player discovers recipe:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Contexts<context.recipe_id> returns the ID of the recipe discovered.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupPlayer
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerRecipeDiscoverScriptEvent.java#L14
Nameplayer inventory slot changes
Event Lines player inventory slot changes
Triggerswhen the item in a slot of a player's inventory changes.
Note that this fires for every item in the player's inventory when they join.
Generated Examplesafter player inventory slot changes:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Switchesfrom:<item> to only process the event if the previous item in the slot matches the specified item.
to:<item> to only process the event if the new item in the slot matches the specified item.
slot:<slot> to only process the event if a specific slot was clicked. For slot input options, see Language:Slot Inputs.
Contexts<context.new_item> returns an ItemTag of the new item in the slot.
<context.old_item> returns an ItemTag of the previous item in the slot.
<context.slot> returns an ElementTag(Number) of the slot that was changed.
<context.raw_slot> returns an ElementTag(Number) of the raw number of the slot that was changed.
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupPaper
RequiresPaper
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/events/PlayerInventorySlotChangeScriptEvent.java#L16
Nameplayer places hanging
Event Lines player places <hanging>
Triggerswhen a hanging entity (painting or itemframe) is placed.
Generated Examplesafter player places hanging:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Switchesitem:<item> to only process the event when the hangable item matches the given ItemTag matcher.
Contexts<context.hanging> returns the EntityTag of the hanging.
<context.location> returns the LocationTag of the block the hanging was placed on.
<context.item> returns the ItemTag that was placed.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupPlayer
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerPlacesHangingScriptEvent.java#L17

Semi-Decent Match Results



Command


NameAdjust
Related Guide Pagehttps://guide.denizenscript.com/guides/basics/mechanisms.html
Syntaxadjust [<ObjectTag>/def:<name>|...] [<mechanism>](:<value>)
Short DescriptionAdjusts an object's mechanism.
Full DescriptionMany object tag types contains options and properties that need to be adjusted.
Denizen employs a mechanism interface to deal with those adjustments.
To easily accomplish this, use this command with a valid object mechanism, and sometimes accompanying value.

Specify "def:<name>" as an input to adjust a definition and automatically save the result back to the definition.

You can optionally adjust a MapTag of mechanisms to values.

To adjust an item in an inventory, use Command:inventory, as '- inventory adjust slot:<#> <mechanism>:<value>'.
Note that that is only for items, not actual inventories.
To adjust an actual InventoryTag mechanism, you should still use the normal 'adjust' command, not 'inventory adjust'.
Related Tags<entry[saveName].result> returns the adjusted object.
<entry[saveName].result_list> returns a ListTag of adjusted objects.
Usage Example
# Use to set a custom display name on an entity.
- adjust <[some_entity]> custom_name:ANGRY!
Usage Example
# Use to set the skin of every online player.
- adjust <server.online_players> skin:Notch
Usage Example
# Use to modify an item held in a definition.
- adjust def:stick "display_name:Fancy stick"
Synonyms (Search Aid)mechanism
Groupcore
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/core/AdjustCommand.java#L31
NameAnimate
Syntaxanimate [<entity>|...] [animation:<name>] (for:<player>|...)
Short DescriptionMakes a list of entities perform a certain animation.
Full DescriptionMinecraft implements several player and entity animations which the animate command can use, just
specify an entity and an animation.

Player animations require a Player-type entity or NPC. Available player animations include:
ARM_SWING, HURT, CRIT, MAGIC_CRIT, SIT, SLEEP, SNEAK, STOP_SITTING, STOP_SLEEPING, STOP_SNEAKING,
START_USE_MAINHAND_ITEM, START_USE_OFFHAND_ITEM, STOP_USE_ITEM, EAT_FOOD, ARM_SWING_OFFHAND

All entities also have available Bukkit's entity effect list:
🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/EntityEffect.html
These EntityEffect options can optionally be played only for specific players with the "for:" argument input.

In addition, Denizen adds a few new entity animations:
SKELETON_START_SWING_ARM, SKELETON_STOP_SWING_ARM,
POLAR_BEAR_START_STANDING, POLAR_BEAR_STOP_STANDING,
HORSE_BUCK, HORSE_START_STANDING, HORSE_STOP_STANDING,
IRON_GOLEM_ATTACK,
VILLAGER_SHAKE_HEAD,
SWING_MAIN_HAND, SWING_OFF_HAND

Note that the above list only applies where logical, EG 'WOLF_' animations only apply to wolves.

In versions 1.20+, to specify the direction of damage for the HURT animation, use Mechanism:EntityTag.play_hurt_animation
Related TagsNone
Usage Example
# Use to make a player appear to get hurt.
- animate <player> animation:hurt
Usage Example
# Use to make a wolf NPC shake.
- animate <npc> animation:wolf_shake
Groupentity
RequiresCitizens
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/AnimateCommand.java#L29
NameCompass
Syntaxcompass [<location>/reset]
Short DescriptionRedirects the player's compass to target the given location.
Full DescriptionRedirects the compass of the player, who is attached to the script queue.

This is not the compass item, but the command is controlling the pointer the item should direct at.
This means that all item compasses will point the same direction but differently for each player.

To affect an individual compass item, use Mechanism:ItemTag.lodestone_location

The y-axis is not used but its fine to be included in the location argument.

Reset argument will turn the direction to default (spawn or bed)
Related Tags<PlayerTag.compass_target> Returns the location of the player's compass target.
Usage Example
# Use to reset the compass direction to its default.
- compass reset
Usage Example
# Use to point with a compass to the player's current location.
- compass <player.location>
Usage Example
# Use to point with a compass to the world's spawn location.
- compass <player.world.spawn_location>
Groupplayer
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/player/CompassCommand.java#L23
NameFish
Syntaxfish [<location>/stop] (catch:{none}/default/junk/treasure/fish) (chance:<#>)
Short DescriptionCauses an NPC to begin fishing around a specified location.
Full DescriptionCauses an NPC to begin fishing at the specified location.
Setting catch determines what items the NPC may fish up, and the chance is the odds of the NPC fishing up an item.
Related TagsNone
Usage Example
# Makes the NPC throw their fishing line out to where the player is looking, with a 50% chance of catching fish.
- fish <player.cursor_on> catch:fish chance:50
Usage Example
# Makes the NPC stop fishing.
- fish stop
Groupnpc
RequiresCitizens
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/npc/FishCommand.java#L27
Namelibsdisguise
Syntaxlibsdisguise [remove/player/mob/misc] (type:<entity type>) (target:<entity>) (name:<text>) (display_name:<text>) (baby) (id:<item>) (self) (hide_name)
Short DescriptionDisguises an entity as a different entity.
Full DescriptionDisguises an entity using Lib's Disguises.
This hides the true entity and replaces it with a fake entity as a disguise.
The entity mimics the same actions and movement as the entity in a disguise.

The required argument depends on the first argument:
For 'mob':
Specify an entity type.
Optionally, specify if the mob is a baby or not (defaults to false).
For 'player':
Specify the player name.
For 'misc':
Specify a misc disguise type.
Optionally, specify id as an ItemTag.

Removing a disguise shows the true entity again for all players.
Only one disguise can be set per target, if another one is set, the previous disguise is removed.

Optionally specify 'self' to hide the disguise from the target player, so they still see their normal player.

Optionally specify 'baby' to make the disguised mob a baby (where applicable).

Optionally specifiy 'hide_name' to hide the nameplate of a player disguise.

Optionally specify 'display_name' to set the display name of the disguise.
Related Tags<EntityTag.libsdisguise_is_disguised> Returns whether the entity is in a disguise.
<EntityTag.libsdisguise_disguise> Returns the disguise of the entity.
Usage Example
# Use to disguise the linked player as a different player named Bob.
- libsdisguise player name:Bob
Usage Example
# Use to disguise the linked player as a baby Zombie, which can only be seen by other players.
- libsdisguise mob type:ZOMBIE baby:true self:true
Usage Example
# Use to disguise the linked player as a Boat.
- libsdisguise misc type:Boat
Usage Example
# Use to disguise the linked player as a Sponge Block.
- libsdisguise misc type:Falling_Block id:sponge
Usage Example
# Use to remove the disguise from the linked player.
- libsdisguise remove
Usage Example
# Use to disguise an entity as a player named Bob.
- libsdisguise player target:<player.target> name:Bob
Usage Example
# Use to remove a disguise from an entity.
- libsdisguise remove target:<player.target>
GroupDepenizen
RequiresDepenizen, LibsDisguises
Sourcehttps://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/commands/libsdisguises/LibsDisguiseCommand.java#L25
NameModifyBlock
Syntaxmodifyblock [<location>|.../<ellipsoid>/<cuboid>] [<material>|...] (no_physics/naturally:<tool>) (delayed) (<script>) (<percent chance>|...) (source:<player>) (max_delay_ms:<#>)
Short DescriptionModifies blocks.
Full DescriptionChanges blocks in the world based on the criteria given.

Use 'no_physics' to place the blocks without physics taking over the modified blocks.
This is useful for block types such as portals or water. This does NOT control physics for an extended period of time.

Specify (<percent chance>|...) to give a chance of each material being placed (in any material at all).

Use 'naturally:' when setting a block to air to break it naturally, meaning that it will drop items. Specify the tool item that should be used for calculating drops.

Use 'delayed' to make the modifyblock slowly edit blocks at a time pace roughly equivalent to the server's limits.
Optionally, specify 'max_delay_ms' to control how many milliseconds the 'delayed' set can run for in any given tick (defaults to 50).

Note that specifying a list of locations will take more time in parsing than in the actual block modification.

Optionally, specify a script to be ran after the delayed edits finish. (Doesn't fire if delayed is not set.)

Optionally, specify a source player. When set, Bukkit events will fire that identify that player as the source of a change, and potentially cancel the change.
The source argument might cause weird interoperation with other plugins, use with caution.

The modifyblock command is ~waitable. Refer to Language:~waitable.
Related Tags<LocationTag.material> Returns the material of the block at the location.
Usage Example
# Use to change the block a player is looking at to stone.
- modifyblock <player.cursor_on> stone
Usage Example
# Use to modify an entire cuboid to half stone, half dirt.
- modifyblock <player.location.to_cuboid[<player.cursor_on>]> stone|dirt
Usage Example
# Use to modify an entire cuboid to some stone, some dirt, and some left as it is.
- modifyblock <player.location.to_cuboid[<player.cursor_on>]> stone|dirt 25|25
Usage Example
# Use to modify the ground beneath the player's feet.
- modifyblock <player.location.add[2,-1,2].to_cuboid[<player.location.add[-2,-1,-2]>]> RED_WOOL
Synonyms (Search Aid)setblock, changeblock, placeblock, breakblock
Groupworld
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/world/ModifyBlockCommand.java#L62
NamePlayEffect
Syntaxplayeffect [effect:<name>] [at:<location>|...] (data:<#.#>) (special_data:<map>) (visibility:<#.#>) (quantity:<#>) (offset:<#.#>,<#.#>,<#.#>) (targets:<player>|...) (velocity:<vector>)
Short DescriptionPlays a visible or audible effect at the location.
Full DescriptionAllows the playing of particle effects anywhere without the need of the source it comes from originally.
The particles you may use, can come from sources such as a potion effect or a portal/Enderman with their particles respectively.
Some particles have different data which may include different behavior depending on the data. Default data is 0
Specifying a visibility value changes the sight radius of the effect. For example if visibility is 15; Targeted players won't see it unless they are 15 blocks or closer.
You can add a quantity value that allow multiple of the same effect played at the same time. If an offset is set, each particle will be played at a different location in the offset area.
Everyone will see the particle effects unless a target has been specified.
See Language:Particle Effects for a list of valid effect names.

Version change note: The original PlayEffect command raised all location inputs 1 block-height upward to avoid effects playing underground when played at eg a player's location.
This was found to cause too much confusion, so it is no longer on by default. However, it will still happen for older commands.
The distinction is in whether you include the (now expected to use) "at:" prefix on your location argument.
If you do not have this prefix, the system will assume your command is older, and will apply the 1-block height offset.

Some particles will require input to the "special_data" argument. The data input is a MapTag with different keys per particle.
- For DUST particles, the input is of format [size=<size>;color=<color>], e.g. "[size=1.2;color=red]".
- For DUST_COLOR_TRANSITION particles, the input is of format [size=<size>;from=<color>;to=<color>], e.g "[size=1.2;from=red;to=blue]".
- For BLOCK, BLOCK_CRUMBLE, BLOCK_MARKER, DUST_PILLAR, or FALLING_DUST particles, the input is of format [material=<material>], e.g. [material=stone]
- For VIBRATION particles, the input is of format [origin=<location>;destination=<location/entity>;duration=<duration>], for example: [origin=<player.location>;destination=<player.cursor_on>;duration=5s]
- For ITEM particles, the input is of format [item=<item>], e.g. "[item=stick]".
- For TRAIL particles, the input is of format [color=<color>;target=<location>;duration=<duration>], e.g. "[color=red;target=<player.cursor_on>;duration=20s]".
- For ENTITY_EFFECT particles, the input is of format [color=<color>], e.g. "[color=green]".
- For SHRIEK particles, the input is of format [duration=<duration>], e.g. "[duration=1m]".
- For SCULK_CHARGE particles, the input is of format [radians=<element>], e.g. "[radians=<element[90].to_radians>]".

Optionally specify a velocity vector for standard particles to move. Note that this ignores the 'data' input if used.
Related Tags<server.effect_types> Returns a list of all 'effect' types known to the server. (...)
<server.particle_types> Returns a list of all particle effect types known to the server. (...)
Usage Example
# Use to create a fake explosion.
- playeffect effect:EXPLOSION_HUGE at:<player.location> visibility:500 quantity:10 offset:2.0
Usage Example
# Use to play a cloud effect.
- playeffect effect:CLOUD at:<player.location.add[0,5,0]> quantity:20 data:1 offset:0.0
Usage Example
# Use to play some effects at spawn.
- playeffect effect:FIREWORKS_SPARK at:<world[world].spawn_location> visibility:100 quantity:375 data:0 offset:50.0
Usage Example
# Use to spawn a cloud of rainbow-colored ENTITY_EFFECT particles around yourself.
- foreach <util.color_names> as:color:
    - playeffect effect:ENTITY_EFFECT at:<player.eye_location> quantity:25 special_data:[color=<[color]>]
Usage Example
# Use to shoot particles in to the direction you're looking at.
- repeat 10:
    - playeffect effect:TRAIL at:<player.eye_location> quantity:1 offset:0 special_data:[color=red;target=<player.eye_location.ray_trace[default=air]>;duration=5s]
    - wait 1t
Usage Example
# Use to spawn a SCULK_CHARGE effect upside down.
- playeffect effect:SCULK_CHARGE at:<player.eye_location.add[0,1,0]> quantity:1 offset:0 special_data:[radians=<element[180].to_radians>]
Usage Example
# Use to play a SHRIEK effect with a 5-second delay.
- playeffect effect:SHRIEK at:<player.eye_location.add[0,1,0]> quantity:1 special_data:[duration=5s]
Synonyms (Search Aid)particle
Groupworld
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/world/PlayEffectCommand.java#L55
NameSchematic
Syntaxschematic [create/load/unload/rotate/save/flip_x/flip_y/flip_z/paste (fake_to:<player>|... fake_duration:<duration>) (noair) (mask:<material_matcher>)] [name:<name>] (filename:<name>) (angle:<#>) (<location>) (area:<area>) (delayed) (max_delay_ms:<#>) (entities) (flags)
Short DescriptionCreates, loads, pastes, and saves schematics (Sets of blocks).
Full DescriptionCreates, loads, pastes, and saves schematics. Schematics are files containing info about blocks and the order of those blocks.

Denizen offers a number of tools to manipulate and work with schematics.
Schematics can be rotated, flipped, pasted with no air, or pasted with a delay.

All schematic command usages must specify the "name" argument, which is a unique global identifier of the schematic in memory.
This will be created by "create" or "load" options, and persist in memory until "unload" is used (or the server is restarted).

The 'create' option requires an area and a center location as input.
The area can be defined as any valid ObjectType:AreaObject, such as a CuboidTag.
Note that all schematics are internally tracked as cuboids, and other area shapes will only constrain the copy region.
Note that the block boundaries of non-cuboid regions are defined by whether the region definition contains the center of a block.
This will create a new schematic in memory based on world data.

The "rotate angle:#" and "flip_x/y/z" options will apply the change to the copy of the schematic in memory, to later be pasted or saved.
This will rotate the set of blocks itself, the relative origin, and any directional blocks inside the schematic.
Rotation angles must be a multiple of 90 degrees.

When using 'paste', you can specify 'angle:#' to have that paste rotated, without rotating the original schematic.

The "delayed" option makes the command non-instant. This is recommended for large schematics.
For 'save', 'load', and 'rotate', this processes async to prevent server lockup.
For 'paste' and 'create', this delays how many blocks can be processed at once, spread over many ticks.
Optionally, specify 'max_delay_ms' to control how many milliseconds the 'delayed' set can run for in any given tick (defaults to 50) (for create/paste only).

The "load" option by default will load '.schem' files. If no '.schem' file is available, will attempt to load a legacy '.schematic' file instead.

For load and save, the "filename" option is available to specify the name of the file to look for.
If unspecified, the filename will default to the same as the "name" input.

The "noair" option skips air blocks in the pasted schematics- this means those air blocks will not replace any blocks in the target location.

The "mask" option can be specified to limit what block types the schematic will be pasted over.
When using "create" and "mask", any block that doesn't match the mask will become a structure void.

The "fake_to" option can be specified to cause the schematic paste to be a fake (packet-based, see Command:showfake)
block set, instead of actually modifying the blocks in the world.
This takes an optional duration as "fake_duration" for how long the fake blocks should remain.

The "create" and "paste" options allow the "entities" argument to be specified - when used, entities will be copied or pasted.
At current time, entity types included will be: Paintings, ItemFrames, ArmorStands.

The "create" option allows the "flags" argument to be specified - when used, block location flags will be copied.

The schematic command is ~waitable as an alternative to 'delayed' argument. Refer to Language:~waitable.

To delete a schematic file, use Mechanism:server.delete_file.
Related Tags<schematic[<name>].height> Returns the height (Y) of the schematic.
<schematic[<name>].length> Returns the length (Z) of the schematic.
<schematic[<name>].width> Returns the width (X) of the schematic.
<schematic[<name>].block[<location>]> Returns the material for the block at the location in the schematic. (...)
<schematic[<name>].origin> Returns the origin location of the schematic.
<schematic[<name>].blocks> Returns the number of blocks in the schematic.
<schematic[<name>].exists> Returns whether the schematic exists.
<schematic[<name>].cuboid[<origin_location>]> Returns a cuboid of where the schematic would be if it was pasted at an origin.
<schematic.list> Returns a list of all loaded schematics.
Usage Example
# Use to create a new schematic from a cuboid and an origin location.
- schematic create name:MySchematic area:<[my_cuboid]> <player.location>
Usage Example
# Use to load a schematic.
- ~schematic load name:MySchematic
Usage Example
# Use to unload a schematic.
- schematic unload name:MySchematic
Usage Example
# Use to paste a loaded schematic with no air blocks.
- schematic paste name:MySchematic <player.location> noair
Usage Example
# Use to save a created schematic.
- ~schematic save name:MySchematic
Groupworld
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/world/SchematicCommand.java#L58
NameSidebar
Syntaxsidebar (add/remove/{set}/set_line) (title:<title>) (scores:<#>|...) (values:<line>|...) (start:<#>/{num_of_lines}) (increment:<#>/{-1}) (players:<player>|...) (per_player)
Short DescriptionControls clientside-only sidebars.
Full DescriptionThis command was created as a simpler replacement for using the Scoreboard command to display per-player sidebars.
By using packets and dummies, it enables you to have non-flickering, fully functional sidebars,
without wasting processing speed and memory on creating new Scoreboards for every single player.

Using this command, you can add, remove, or set lines on the scoreboard.

To set the title of the sidebar, use the 'title:' parameter in any case where the action is 'set'.

By default, the score numbers descend from the total line count to 1.
To customize the automatic score values, use the 'start:' and 'increment:' arguments in any case where the action is 'set'.
'Start' is the score where the first line will be shown with. The default 'start' value is determined by how many items are specified in 'values:'.
'Increment' is the difference between each score and the default is -1.

To instead set entirely custom numbers, use the 'scores:' input with a list of numbers,
where each number is the score to use with the value at the same place in the 'values:' list.

You can remove by line value text, or by score number.

The per_player argument is also available, and helps to reduce the number of loops required for updating multiple players' sidebars.
When it is specified, all tags in the command will fill based on each individual player in the players list.
So, for example, you could have <player.name> on a line and it will show each player specified their name on that line.
Related Tags<PlayerTag.sidebar_lines> Returns the current lines set on the player's Sidebar via Command:sidebar.
<PlayerTag.sidebar_title> Returns the current title set on the player's Sidebar via Command:sidebar.
<PlayerTag.sidebar_scores> Returns the current scores set on the player's Sidebar via Command:sidebar, (...)
Usage Example
# Use to show all online players a sidebar.
- sidebar set "title:Hello World!" "values:This is|My Message!|Wee!" players:<server.online_players>
Usage Example
# Use to show a few players their ping.
- sidebar set title:Info "values:Ping<&co> <player.ping>" players:<[someplayer]>|<[player]>|<[aplayer]> per_player
Usage Example
# Use to set a sidebar with the score values indicating information to the user.
- sidebar set scores:<server.online_players.size>|<server.max_players> "values:Players online|Players allowed"
Usage Example
# Use to change a specific line of a sidebar.
- sidebar set_line scores:5 "values:Better message!"
Usage Example
# Use to add a line to the bottom of the sidebar.
- sidebar add "values:This is the bottom!"
Usage Example
# Use to remove multiple lines from the sidebar.
- sidebar remove scores:2|4|6
Usage Example
# Use to stop showing the sidebar.
- sidebar remove
Groupplayer
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/player/SidebarCommand.java#L37

Event


Nameblock shears entity
Event Lines <block> shears <entity>
Triggerswhen a dispenser shears a nearby sheep.
Generated Exampleson 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.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupBlock
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/block/BlockShearEntityScriptEvent.java#L14
Nameentity breeds
Event Lines <entity> breeds
Triggerswhen two entities breed.
Generated Examplesafter 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.
DetermineElementTag(Number) to set the amount of experience granted by breeding.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupEntity
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityBreedScriptEvent.java#L15
Nameentity changes food level
Event Lines <entity> changes food level
Triggerswhen an entity's food level changes.
Generated Exampleson entity changes food level:
on mob changes food level:
Has Playerwhen 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 NPCwhen the entity that's food level has changed is an NPC.
Switchesitem:<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.
DetermineElementTag(Number) to set the entity's new food level.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
Synonyms (Search Aid)player hunger depletes
GroupEntity
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityFoodLevelChangeScriptEvent.java#L16
Nameentity dies|death
Event Lines <entity> dies|death
Triggerswhen 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 Examplesafter entity death:
after command_block_minecart death:
Has Playerwhen the entity that died is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Has NPCwhen the entity that died is an NPC.
Switchesby:<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 Language: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.
DetermineElementTag 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.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupEntity
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityDeathScriptEvent.java#L27
Nameentity loads crossbow
Event Lines <entity> loads crossbow
Triggerswhen a living entity loads a crossbow with a projectile.
Generated Examplesafter entity loads crossbow:
on tropical_fish loads crossbow:
Has Playerwhen the entity is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Has NPCwhen the entity is an NPC.
Switchescrossbow:<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.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupPaper
RequiresPaper
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/events/EntityLoadCrossbowScriptEvent.java#L16
Namebrewing stand brews
Event Lines brewing stand brews
Triggerswhen a brewing stand brews a potion.
Generated Exampleson brewing stand brews:
Contexts<context.location> returns the LocationTag of the brewing stand.
<context.inventory> returns the InventoryTag of the brewing stand's contents.
<context.fuel_level> returns an ElementTag(Number) of the brewing stand's fuel level.
<context.result> returns a ListTag(ItemTag) of the items that will be brewed.
Determine"RESULT:<ListTag(ItemTag)>" to change the items that are brewed.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupBlock
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/block/BrewsScriptEvent.java#L16
Namebrewing starts
Event Lines brewing starts
Triggerswhen a brewing stand starts brewing a potion.
Generated Exampleson brewing starts:
Contexts<context.item> returns an ItemTag of the used ingredient to brew potions.
<context.location> returns a LocationTag of the brewing stand's location.
<context.brew_time> returns a DurationTag of the total time it will take to brew the potion.
Determine"BREW_TIME:DurationTag" to set the total time for the potion being brewed.
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupBlock
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/block/BrewingStartsScriptEvent.java#L14
Namechestshop transaction
Event Lines chestshop transaction
Triggerswhen a transaction occurs at a chestshop.
Generated Examplesafter chestshop transaction:
on chestshop transaction:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Switchestype:<type> to only process if the transaction was either a "buy" or "sell" event.
Contexts<context.container> returns a LocationTag of the container attached to the shop, if any.
<context.item> returns a ListTag(ItemTag) of the item(s) involved in the transaction.
<context.money> returns an ElementTag(Decimal) of the amount of money involved in the transaction.
<context.sign> returns a LocationTag of the sign running the shop.
<context.type> returns the transaction type, either "BUY" or "SELL".
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
GroupDepenizen
RequiresDepenizen, ChestShop
Sourcehttps://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/events/chestshop/ChestShopTransactionScriptEvent.java#L19
Namefirework bursts
Event Lines firework bursts
Triggerswhen a firework bursts (explodes).
Generated Examplesafter firework bursts:
on firework bursts:
Contexts<context.entity> returns the firework that exploded.
<context.item> returns the firework item.
<context.location> returns the LocationTag the firework exploded at.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupEntity
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/FireworkBurstsScriptEvent.java#L16
Nameloot generates
Event Lines loot generates
Triggerswhen loot is generated somewhere in the world (like a vanilla chest being opened for the first time).
Generated Examplesafter loot generates:
Has Playerwhen the linked entity is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Switchesfor:<type> to only process the event if a certain inventory type is receiving loot (like 'for:chest').
Contexts<context.entity> returns an entity that caused loot generation, if any.
<context.inventory> returns the InventoryTag that loot is generating into.
<context.items> returns a ListTag of the items being generated.
<context.loot_table_id> returns an element indicating the minecraft key for the loot-table that was generated.
Determine"LOOT:<ListTag(ItemTag)>" to change the list of items that will generate as loot.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupWorld
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/world/LootGenerateScriptEvent.java#L22
Namemagicspells entity casts spell
Event Lines magicspells <entity> casts <spell>
Triggerswhen an entity starts to cast a spell.
Generated Exampleson magicspells firework_rocket casts spell:
after magicspells entity casts spell:
Has PlayerWhen 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.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
GroupDepenizen
RequiresDepenizen, MagicSpells
Sourcehttps://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/events/magicspells/SpellCastScriptEvent.java#L26
Namemythicmob mob dies|death|killed
Event Lines mythicmob <mob> dies|death|killed
Triggerswhen a MythicMob dies.
Generated Examplesafter mythicmob mob killed:
on mythicmob mob death:
Switchesby:<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.
DetermineListTag(ItemTag) to specify new items to be dropped.
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupDepenizen
RequiresDepenizen, MythicMobs
Sourcehttps://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/events/mythicmobs/MythicMobsDeathEvent.java#L22
Namepiglin barter
Event Lines piglin barter
Triggerswhen a piglin completes a barter.
Generated Exampleson piglin barter:
Switchesinput:<item> to only process the event if the input item matches the given item matcher.
Contexts<context.entity> returns the EntityTag of the piglin.
<context.input> returns the ItemTag of the input item.
<context.outcome> returns a ListTag(ItemTag) of outcome items.
Determine"RESULT:<ListTag(ItemTag)>" to determine the items that are outputted.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupEntity
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/PiglinBarterScriptEvent.java#L15
Nameplayer right|left clicks block
Event Lines player (right|left) clicks <block>
Triggerswhen a player clicks on a block or in the air.
Generated Examplesafter player left clicks waxed_oxidized_copper_grate:
on player clicks mossy_cobblestone_stairs:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Switcheswith:<item> to only process the event if a specified item was held.
using:hand/off_hand/either_hand to only process the event if the specified hand was used to click.
type:<material> to only run if the block clicked matches the material input.
Contexts<context.item> returns the ItemTag the player is clicking with.
<context.location> returns the LocationTag the player is clicking on.
<context.relative> returns a LocationTag of the air block in front of the clicked block.
<context.click_type> returns an ElementTag of the Spigot API click type 🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/Action.html.
<context.hand> returns an ElementTag of the used hand.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupPlayer
Warning(s)this event may in some cases double-fire, requiring usage of the 'ratelimit' command (like 'ratelimit <player> 1t') to prevent doubling actions.
this sometimes fires at unexpected times, eg when dropping an item.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerClicksBlockScriptEvent.java#L22
Nameplayer activates riptide
Event Lines player activates riptide
Triggerswhen a player activates the riptide effect.
Generated Examplesafter player activates riptide:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Contexts<context.item> returns the ItemTag of the trident.
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupPlayer
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerRiptideScriptEvent.java#L15
Nameplayer boosts elytra
Event Lines player boosts elytra
Triggerswhen a player boosts their elytra with a firework rocket while gliding.
Generated Exampleson player boosts elytra:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Switcheswith:<item> to only process the event if the firework item used matches the specified item.
elytra:<item> to only process the event if the elytra used matches the specified item.
Contexts<context.item> returns the firework item used to boost.
<context.entity> returns the firework entity that was spawned.
<context.should_keep> returns whether the firework item gets consumed.
Determine"KEEP:<ElementTag(Boolean)>" to set whether the firework item should be kept.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupPaper
RequiresPaper
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/events/PlayerElytraBoostScriptEvent.java#L17
Nameplayer breaks block
Event Lines player breaks block
player breaks <material>
Triggerswhen a player breaks a block.
Generated Examplesafter player breaks block:
after player breaks nether_brick_stairs:
on player breaks block:
on player breaks material:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Switcheswith:<item> to only process the event when the player is breaking the block with a specified item.
Contexts<context.location> returns the LocationTag the block was broken at.
<context.material> returns the MaterialTag of the block that was broken.
<context.xp> returns how much XP will be dropped.
<context.should_drop_items> returns whether the event will drop items.
Determine"NOTHING" to make the block drop no items.
ListTag(ItemTag) to make the block drop a specified list of items.
ElementTag(Number) to set the amount of xp to drop.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
Synonyms (Search Aid)player mines block, player mines ore, player digs block
GroupPlayer
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerBreaksBlockScriptEvent.java#L21
Nameplayer chooses arrow
Event Lines player chooses arrow
Triggerswhen a player chooses an arrow to load a bow/crossbow.
Example
# This example prevents using any arrow but spectral_arrows.
on player chooses arrow arrow:!spectral_arrow:
- determine cancelled
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Switchesarrow:<item> to only process the event when the players chosen arrow matches the input.
bow:<item> to only process the event when the players bow matches the input.
Contexts<context.arrow> returns the ItemTag of the arrow that was chosen.
<context.bow> returns the ItemTag of the bow that is about to get loaded.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupPlayer
RequiresPaper
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/events/PlayerChoosesArrowScriptEvent.java#L17
Nameplayer completes skyblock challenge
Event Lines player completes skyblock challenge
Triggerswhen a player completes a skyblock challenge.
Generated Exampleson player completes skyblock challenge:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Contexts<context.challenge> Returns the name of the challenge.
<context.xp_reward> Return the amount of experience to be rewarded.
<context.money_reward> Returns the amount of money to be rewarded.
<context.item_rewards> Returns a list of items to be awarded.
NOTE: item rewards is dependant on how the plugin handles item rewards. Untested and no guarantee of working.
GroupDepenizen
RequiresDepenizen, A SkyBlock
Sourcehttps://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/events/askyblock/PlayerCompletesSkyBlockChallengeScriptEvent.java#L17
Nameplayer edits book
Event Lines player edits book
player signs book
Triggerswhen a player edits or signs a book.
Generated Examplesafter player edits book:
after player signs book:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Contexts<context.title> returns the name of the book, if any.
<context.pages> returns the number of pages in the book.
<context.book> returns the book item being edited, containing the new page contents.
<context.old_book> returns the book item being edited, containing the old page contents.
<context.signing> returns whether the book is about to be signed.
Determine"NOT_SIGNING" to prevent the book from being signed.
ScriptTag to set the book information to set it to instead.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupPlayer
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerEditsBookScriptEvent.java#L21
Nameplayer flips lectern page
Event Lines player flips lectern page
Triggerswhen the player flips to a page in a lectern.
Example
# Announce the page the player flipped to.
on player flips lectern page:
- announce "<player.name> flipped to page #<context.new_page>!"
Example
# Flips the player to page 5 if they are flagged with "pancakes".
on player flips lectern page flagged:pancakes:
- determine page:5
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Switchesbook:<item> to only process the event if the book on the lectern matches the given item.
Contexts<context.book> returns an ItemTag of the book in the lectern.
<context.lectern> returns a LocationTag of the lectern.
<context.old_page> returns an ElementTag(Number) of the last page the player was on.
<context.new_page> returns an ElementTag(Number) of the new page that the player flipped to.
<context.flip_direction> returns the direction in which the player flips the lectern book page, can be either LEFT or RIGHT.
Determine"PAGE:<ElementTag(Number)>" to set the page that the player will flip to.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupPaper
RequiresPaper
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/events/PlayerLecternPageChangeScriptEvent.java#L16
Nameplayer picks up launched arrow
Event Lines player picks up launched arrow
Triggerswhen a player picks up a launched arrow projectile entity that is embedded into the ground. Will not necessarily fire for creative players.
Generated Examplesafter player picks up launched arrow:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Contexts<context.arrow> returns the arrow entity.
<context.item> returns the item of the arrow.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupPlayer
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerPickupArrowScriptEvent.java#L15
Nameplayer receives links
Event Lines player receives links
Triggerswhen a player receives a list of server links.
Generated Exampleson player receives links:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Determine"LINKS:<ListTag(MapTag)>" to set the links sent to the player. Each item in the list must be a MapTag in Language:Server Links Format.
"ADD_LINKS:<ListTag(MapTag)>" to send additional links to the player. Each item in the list must be a MapTag in Language:Server Links Format.
GroupPaper
RequiresPaper
Warning(s)this may fire early in the player login process, during which the linked player is essentially an offline player.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/events/PlayerReceivesLinksScriptEvent.java#L17
Nameplayer right clicks entity
Event Lines player right clicks <entity>
Triggerswhen a player right clicks on an entity.
Generated Examplesafter player right clicks entity:
after player right clicks cave_spider:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Switcheswith:<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.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupPlayer
Warning(s)this event may in some cases double-fire, requiring usage of the 'ratelimit' command (like 'ratelimit <player> 1t') to prevent doubling actions.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerRightClicksEntityScriptEvent.java#L21
Nameplayer selects stonecutter recipe
Event Lines player selects stonecutter recipe
Triggerswhen a player selects a recipe in a stonecutter.
Generated Exampleson player selects stonecutter recipe:
after player selects stonecutter recipe:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Switchesrecipe_id:<recipe_id> to only process the event if the recipe matches the recipe ID.
Contexts<context.inventory> returns the InventoryTag of the stonecutter inventory.
<context.input> returns an ItemTag of the item in the input slot.
<context.result> returns an ItemTag of the item in the result slot.
<context.recipe_id> returns the ID of the recipe that was selected.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupPlayer
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/events/PlayerSelectsStonecutterRecipeScriptEvent.java#L16
Nameplayer uses recipe book
Event Lines player uses recipe book
Triggerswhen a player interacts with their recipe book.
Generated Exampleson player uses recipe book:
after player uses recipe book:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Contexts<context.recipe> returns the key of the recipe that was clicked.
<context.is_all> returns 'true' if the player is trying to make the maximum amount of items from the recipe, otherwise 'false'.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupPaper
RequiresPaper
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/events/PlayerClicksInRecipeBookScriptEvent.java#L14
Nameshopkeeper trade
Event Lines shopkeeper trade
Triggerswhen a trade with a shopkeeper is completed.
If you intend to cancel this event, use Event:ShopKeeperTradeInitiatedScriptEvent instead.
Generated Exampleson shopkeeper trade:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Contexts<context.recipe> Returns a ListTag(ItemTag) of the trade in the form Offered|Offered|Result.
<context.shopkeeper> Returns the ShopKeeperTag of the ShopKeeper that the trade occurred with.
GroupDepenizen
RequiresDepenizen, ShopKeepers
Sourcehttps://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/events/shopkeepers/ShopKeeperTradeCompletedScriptEvent.java#L15
Nameshopkeepers player tries trading
Event Lines shopkeepers player tries trading
Triggerswhen a trade with a shopkeeper is initiated.
Generated Exampleson shopkeepers player tries trading:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Contexts<context.recipe> Returns a ListTag(ItemTag) of the trade in the form Offered|Offered|Result.
<context.shopkeeper> Returns the ShopKeeperTag of the ShopKeeper that the trade occurs with.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
GroupDepenizen
RequiresDepenizen, ShopKeepers
Warning(s)This event is called for each successful trade option a ShopKeeper offers. Canceling a trade will also cancel all successive trades that might otherwise have been triggered.
Sourcehttps://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/events/shopkeepers/ShopKeeperTradeInitiatedScriptEvent.java#L15

Language


NameAdvanced Object Matchables
DescriptionScript events have a variety of matchable object inputs, and the range of inputs they accept may not always be obvious.
For example, an event might be "player clicks <block>"... what can "<block>" be filled with?

"<block>" usually indicates that a LocationTag and/or MaterialTag will be matched against.
This means you can specify any valid block material name, like "stone" or "air", like "on player clicks stone:" (will only run the event if the player is clicking stone)
You can also use a catch-all such as "block", like "on player clicks block:" (will always run the event when the player clicks anything/anywhere)
You can also use some more complicated matchables such as "vanilla_tagged:", like "on player clicks vanilla_tagged:mineable/axe:" (will run if the block is mineable with axes)
(For more block-related options, refer to the ObjectType:LocationTag and ObjectType:MaterialTag matchers lists.)

Many object types can be used for matchables, the valid inputs are unique depending on the object type involved.

Some inputs don't refer to any object at all - they're just advanced matchers for some generic plaintext,
for example "<cause>" implies an enumeration of causes will be matched against.

Many inputs support advanced matchers. For details on that, see Language:Advanced Object Matching.

A common matchable type found among different objects is a Flag Matchable. This usually looks like "item_flagged:<flag>"
This matches if the object has the specified flag, and fails to match if the object doesn't have that flag.
You can specify multiple required flags with '|', like "item_flagged:a|b|c", which will match if-and-only-if the item has ALL the flags named.
They can also be used to require the object does NOT have the flag with a "!" like "item_flagged:!<flag>".
When using multiple flags with "|", the "!" is per-entry, so "item_flagged:!a|b" requires the item DOES have 'b' but does NOT have 'a'.

Note also that in addition to events, tags often also have matchables as input params,
usually documented like ".types[<matcher>]", with tag documentation specifying what matcher is used,
or like "<material_matcher>" to indicate in this example specifically MaterialTag matchables are allowed.

Not all object types have defined matchable options, and those that do list them in their ObjectType meta. For an example of this, check ObjectType:ItemTag.

As a special case, "in:<area>" style matchable listings in event conform to the following option set:
"biome:<name>": matches if the location is in a given biome, using advanced matchers.
"cuboid" plaintext: matches if the location is in any noted cuboid.
"ellipsoid" plaintext: matches if the location is in any noted ellipsoid.
"polygon" plaintext: matches if the location is in any noted polygon.
"chunk_flagged:<flag>": a Flag Matchable for ChunkTag flags.
"area_flagged:<flag>": a Flag Matchable for AreaObject flags.
Area note name: matches if an AreaObject note that matches the given advanced matcher contains the location.
If none of the above are used, uses WorldTag matchers.
GroupObject System
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/BukkitScriptEvent.java#L45
NameAdvanced Object Matching
DescriptionScript event lines often include specific 'matchable' keywords.
For example, while you can write "on player breaks block:" as a script event line,
you can also instead write "on player breaks stone:" to listen to a much more specific event.
This is general in-line matching.
This is made available to avoid needing to do things like "- if <context.material.name> == stone"
just to validate whether an event is even relevant to you.

Of course, there are times when you want to more than one specific thing to be handled by the event, so what do you do?
The Denizen script event system provides a few 'advanced' options to get more detailed matching.

One option is to use wildcards.
For example, there are several 'log' materials, such as 'oak_log', 'birch_log', and more for the rest of the tree types.
So how can you match a player breaking any of these? Use "on player breaks *_log:"
The asterisk is a generic wildcard, it means any text at all will match. So an asterisk followed by '_log' means
any material at all that has a name ending with '_log', including 'birch_log' and the rest.

Note that you can also use multiple wildcards at once, like "on player breaks block with:my_*_script_*:"
That example will work for item scripts named "my_item_script_1" and "my_first_script_of_items" or any similar name.
Note also that wildcards still match for blanks, so "my_item_script_" would still work for that example.

You can also specify lists. For example, if you want an event to work with certain tool types,
the 'on player breaks block:' event supports a switch named 'with', like 'on player breaks block with:iron_pickaxe:'
So lets match multiple tools for our event...
'on player breaks block with:iron_pickaxe|gold_pickaxe|diamond_axe|wooden_shovel:'

You can also combine wildcards and lists... note that lists are the 'wider' option.
That is, if you have wildcards and lists together, you will have a list of possible matches, where each entry may contain wildcards, you will not have a wildcard match with a list.
As a specific example,
'*_pickaxe|*_axe' will match any pickaxe or any axe.
'*_pickaxe|stone' will match any pickaxe or specifically stone. It will NOT match other types of stone, as it interprets
the match to be a list of "*_pickaxe" and "stone", NOT "*" followed by a list of "pickaxe" or "stone".

Additionally, when you're really desperate for a good matcher, you may use 'regex:'
For example, "on player breaks regex:(?i)\d+_customitem:"
Note that generally regex should be avoided whenever you can, as it's inherently hard to track exactly what it's doing at-a-glance, and may have unexpected edge case errors.

If you want to match anything *except* a specific value, just prefix the matcher with '!'
For example, on player breaks !stone:" will fire for a player breaking any block type OTHER THAN stone.
This can be combined with other match modes, like "on player breaks !*wood|*planks|*log:" will fire for any block break other than any wood variant.

These advanced matchers are also used in some commands and tags, such as Tag:ObjectTag.advanced_matches, or in Command:if with the 'matches' operator.

Object types have their own special supported matchable inputs, refer to Language:Advanced Object Matchables.
GroupObject System
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/events/ScriptEvent.java#L828
NameAttribute Modifiers
DescriptionIn minecraft, the "attributes" system defined certain core numerical values on entities, such as max health or attack damage.
The value of an "attribute" is determined by its "base value" modified mathematically by each of its "attribute modififers".
"Attribute modifiers" can be added either directly to the entity, or onto items - when on an item, an entity can equip it into the correct slot to automatically apply the modifier.

These can be read via such tags as Tag:EntityTag.attribute_modifiers, Tag:ItemTag.attribute_modifiers,
Tag:EntityTag.has_attribute, Tag:EntityTag.attribute_value, Tag:EntityTag.attribute_base_value, Tag:EntityTag.attribute_default_value, ...

These can be modified by such mechanisms as Mechanism:EntityTag.attribute_base_values, Mechanism:EntityTag.attribute_modifiers, Mechanism:EntityTag.add_attribute_modifiers,
Mechanism:EntityTag.remove_attribute_modifiers, Mechanism:ItemTag.attribute_modifiers, Mechanism:ItemTag.add_attribute_modifiers, Mechanism:ItemTag.remove_attribute_modifiers, ...

The input format of each of the 'add' and set mechanisms is slightly complicated: a MapTag where the keys are attribute names, and values are a ListTag of modifiers,
where each modifier is itself a MapTag with required keys 'operation' and 'amount', and additionally:
Before MC 1.21: optional 'name', 'slot', and 'id' keys.
The default ID will be randomly generated, the default name will be the attribute name.
After MC 1.21: required 'key' key, and optional 'slot'.
The 'key' is the attribute's name/identifier in a "namespace:key" format (defaulting to the "minecraft" namespace), which has to be distinct to other modifiers of the same type on the object.

Valid operations: ADD_NUMBER, ADD_SCALAR, and MULTIPLY_SCALAR_1
Valid slots (used up to MC 1.20.6): HAND, OFF_HAND, FEET, LEGS, CHEST, HEAD, ANY
Valid slot groups (used on MC 1.20.6+): 🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/EquipmentSlotGroup.html
Valid attribute names are listed at 🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/attribute/Attribute.html
The default slot/slot group is "any".

Operation names are based on the Bukkit enum.
ADD_NUMBER corresponds to Mojang "ADDITION" - adds on top of the base value.
ADD_SCALAR corresponds to Mojang "MULTIPLY_BASE" - adds to the total, multiplied by the base value.
MULTIPLY_SCALAR_1 corresponds to Mojang "MULTIPLY_TOTAL", multiplies the final value (after both "add_number" and "add_scaler") by the amount given plus one.

They are combined like (pseudo-code):

- define x <[base_value]>
- foreach <all_modifiers[ADD_NUMBER]>:
    - define x:+:<[value]>
- define y <[x]>
- foreach <all_modifiers[ADD_SCALAR]>:
    - define y:+:<[x].mul[<[value]>]>
- foreach <all_modifiers[MULTIPLY_SCALAR_1]>:
    - define y:*:<[value].add[1]>
- determine <[y]>


See also 🔗https://minecraft.wiki/w/Attribute#Modifiers

For a quick and dirty in-line input, you can do for example: [generic_max_health=<list[<map[key=my_project:add_health;operation=ADD_NUMBER;amount=20;slot=HEAD]>]>]

For more clean/proper input, instead do something like:

- definemap attributes:
    generic_max_health:
        1:
            key: my_project:add_health
            operation: ADD_NUMBER
            amount: 20
            slot: head
- inventory adjust slot:head add_attribute_modifiers:<[attributes]>


When pre-defining a custom item, instead of this, simply use an item script: Language:item script containers. That page shows an example of valid attribute modifiers on an item script.
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityAttributeModifiers.java#L208
NameBook Script Containers
DescriptionBook script containers are similar to item script containers, except they are specifically
for the book items. They work with the ItemTag object, and can be fetched
with the Object Fetcher by using the ItemTag constructor book_script_name
Example: - give <player> my_book


Book_Script_Name:

    type: book

    # The 'custom name' can be anything you wish.
    # | All book scripts MUST have this key!
    title: custom name

    # The 'custom name' can be anything you wish.
    # | All book scripts MUST have this key!
    author: custom name

    # Defaults to true. Set to false to spawn a 'book and quill' instead of a 'written book'.
    # | Some book scripts might have this key!
    signed: true/false

    # Each -line in the text section represents an entire page.
    # To create a newline, use the tag <n>. To create a paragraph, use <p>.
    # | All book scripts MUST have this key!
    text:
    - page
    - ...
GroupScript Container System
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/containers/core/BookScriptContainer.java#L19
NameClick Triggers
DescriptionClick Triggers are triggered when a player right clicks the NPC.

These are very basic with no extraneous complexity.


click trigger:
    script:
    - narrate "hi <player.name>"


They can optionally have an item matcher with multiple triggers, for the item in the player's hand. For example:

click trigger:
    1:
        trigger: my_item_script
        script:
        - narrate "Nice item script"
    2:
        trigger: stone
        script:
        - narrate "Nice vanilla item"
    3:
        script:
        - narrate "I don't recognize your held item"
GroupNPC Interact Scripts
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/triggers/core/ClickTrigger.java#L25
NameData Actions
DescriptionSeveral commands function as a way to modify data values,
including Command:flag, Command:yaml, and Command:define.
These commands each allow for a set of generic data change operations.

These operations can be used with a syntax like "<key>:<action>:<value>"
For example "mykey:+:5" will add 5 to the value at 'mykey'.

The following actions are available:

Actions that take no input value:
Increment: '++': raises the value numerically up by 1. Example: - define x:++
Decrement: '--': lowers the value numerically down by 1. Example: - define x:--
Remove: '!': removes the value entirely. Example: - define x:!

Actions that take an input value:
Add: '+': adds the input value to the value at the key. Example: - define x:+:5
Subtract: '-': subtracts the input value from the value at the key. Example: - define x:-:5
Multiply: '*': multiplies the value at the key by the input value. Example: - define x:*:5
Divide: '/': divides the value at the key by the input value. Example: - define x:/:5
List insert: '->': adds the input value as a single new entry in the list (see also 'List split'). Example: - define x:->:new_value
List remove: '<-': removes the input value from the list. Example: - define x:<-:old_value
List split: '|': splits the input list and adds each value into an existing list at the key. Example: - define x:|:a|b|c

Special cases:
In some commands, specifying no action or input value will automatically set the key's value to 'true'.
Setting a '<key>:<value>' without an action will set the key to the exact value. Be careful to not input a list like this, use 'split to new' instead.

Note that the <key> input may take an index input as well, for example "mykey[3]:value".
This also works with most actions.
That is, for example: "mykey[3]:--" will decrement the third item in the list at 'mykey'.
This syntax may also be used to remove the entry at a specified index, for example "mykey[3]:<-"
The index can also be "last" to automatically use the last entry in the list as the target.
GroupUseful Lists
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/utilities/data/DataActionType.java#L5
NameEnchantment Script Containers
DescriptionEnchantment script containers allow you to register custom item enchantments.
For the most part, they work similarly to vanilla enchantments, albeit with some limitations.
These can be attached to enchanted books and used in anvils,
and can be generated by the enchanting table (requires discoverable: true and treasure_only: false).

In current implementation, custom enchantments do not appear in lore on their own, and will need fake lore added in their place.
This might be fixed in the future.

It may be beneficial in some cases to restart your server after making changes to enchantments, rather than just reloading scripts.
Rarity, Category, and Slots do not apply changes to an already-loaded script until the next restart (except when the script is newly added).

Using these may cause unpredictable compatibility issues with external plugins.

Enchantment scripts can be automatically disabled by adding "enabled: false" as a root key (supports any load-time-parseable tags).


Enchantment_Script_Name:

    type: enchantment

    # The ID is used as the internal registration key, and for lookups with things like the 'enchantments' mechanism.
    # If unspecified, will use the script name.
    # Limited to A-Z or _.
    # | Most enchantment scripts should have this key!
    id: my_id

    # A list of slots this enchantment is valid in.
    # | ALL enchantment scripts MUST have this key!
    slots:
    # Can be any of: mainhand, offhand, feet, legs, chest, head
    - mainhand

    # The rarity level of this enchantment. Can be any of: COMMON, UNCOMMON, RARE, VERY_RARE
    # If unspecified, will use COMMON.
    # | Most enchantment scripts should have this key!
    rarity: common

    # The category/type of this enchantment. Can be any of: ARMOR, ARMOR_FEET, ARMOR_LEGS, ARMOR_CHEST, ARMOR_HEAD,
    # WEAPON, DIGGER, FISHING_ROD, TRIDENT, BREAKABLE, BOW, WEARABLE, CROSSBOW, VANISHABLE
    # This is used internally by the enchanting table to determine which items to offer the enchantment for.
    # If unspecified, will use WEAPON.
    # | Most enchantment scripts should have this key!
    category: weapon

    # The per-level full name of this enchantment. Does not appear in lore automatically (but might in the future?).
    # Can make use of "<context.level>" for the applicable level.
    # | Most enchantment scripts should have this key!
    full_name: My Enchantment <context.level>

    # The minimum level of this enchantment.
    # If unspecified, will use 1.
    # | Most enchantment scripts can exclude this key.
    min_level: 1

    # The maximum level of this enchantment.
    # If unspecified, will use 1.
    # | Some enchantment scripts should have this key.
    max_level: 1

    # The per-level minimum XP cost of enchanting.
    # Can make use of "<context.level>" for the applicable level.
    # | Most enchantment scripts should have this key!
    min_cost: <context.level.mul[1]>

    # The per-level maximum XP cost of enchanting.
    # Can make use of "<context.level>" for the applicable level.
    # | Most enchantment scripts should have this key!
    max_cost: <context.level.mul[1]>

    # Whether this enchantment is only considered to be treasure. Treasure enchantments do not show in the enchanting table.
    # If unspecified, will be false.
    # | Most enchantment scripts can exclude this key.
    treasure_only: false

    # Whether this enchantment is only considered to be a curse. Curses are removed at grindstones, and spread from crafting table repairs.
    # If unspecified, will be false.
    # | Most enchantment scripts can exclude this key.
    is_curse: false

    # Whether this enchantment is only considered to be tradable. Villagers won't trade this enchantment if set to false.
    # If unspecified, will be true.
    # | Most enchantment scripts can exclude this key.
    is_tradable: true

    # Whether this enchantment is only considered to be discoverable.
    # If true, this will spawn from vanilla sources like the enchanting table. If false, it can only be given directly by script.
    # If unspecified, will be true.
    # | Most enchantment scripts can exclude this key.
    is_discoverable: true

    # A tag that returns a boolean indicating whether this enchantment is compatible with another.
    # Can make use of "<context.enchantment_key>" for the applicable enchantment's key, like "minecraft:sharpness".
    # This is used internally by the enchanting table and the anvil to determine if this enchantment can be given alongside another.
    # If unspecified, will default to always true.
    # | Most enchantment scripts can exclude this key.
    is_compatible: <context.enchantment_key.advanced_matches[minecraft:lure|minecraft:luck*]>

    # A tag that returns a boolean indicating whether this enchantment can enchant a specific item.
    # Can make use of "<context.item>" for the applicable ItemTag.
    # This is used internally to decide whether survival players can copy the enchantment between items on an anvil, as well as for commands like "/enchant".
    # If unspecified, will default to always true.
    # | Most enchantment scripts can exclude this key.
    can_enchant: <context.item.advanced_matches[*_sword|*_axe]>

    # A tag that returns a decimal number indicating how much extra damage this item should deal.
    # Can make use of "<context.level>" for the enchantment level,
    # and "<context.type>" for the type of monster being fought: ARTHROPOD, ILLAGER, WATER, UNDEAD, or UNDEFINED
    # If unspecified, will default to 0.0.
    # | Most enchantment scripts can exclude this key.
    damage_bonus: 0.0

    # A tag that returns an integer number indicating how much this item should protection against damage.
    # Can make use of "<context.level>" for the enchantment level, and "<context.cause>" for the applicable damage cause, using internal cause names (different from Spigot Damage Causes).
    # Internal cause names: inFire, lightningBolt, onFire, lava, hotFloor, inWall, cramming, drown, starve, cactus, fall, flyIntoWall,
    # outOfWorld, generic, magic, wither, anvil, fallingBlock, dragonBreath, dryout, sweetBerryBush, freeze, fallingStalactite, stalagmite
    # Also "<context.attacker>" as an EntityTag if the cause has an attacker specified.
    # If unspecified, will default to 0.
    # | Most enchantment scripts can exclude this key.
    damage_protection: 0

    # Triggered after an enchanted weapon is used to attack an entity.
    # Has <context.attacker> (EntityTag), <context.victim> (EntityTag), and <context.level>.
    # May fire rapidly or multiple times per hit. Use a ratelimit to prevent this.
    # | Some enchantment scripts should have this key.
    after attack:
    - narrate "You attacked <context.victim.name> with a <context.level> enchantment!"

    # Triggered after an enchanted armor is used to defend against an attack.
    # Also fires if an entity is holding a weapon with this enchantment while being hit.
    # Has <context.attacker> (EntityTag), <context.victim> (EntityTag), and <context.level>.
    # | Some enchantment scripts should have this key.
    after hurt:
    - narrate "You got hurt by <context.attacker.name> and protected by a level <context.level> enchantment!"
GroupScript Container System
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/containers/core/EnchantmentScriptContainer.java#L33
NameFlag System
DescriptionThe flag system is a core feature of Denizen, that allows for persistent data storage linked to objects.

"Persistent" means the data is still around even after a server restart or anything else, and is only removed when you choose for it to be removed.
"Linked to objects" means rather than purely global values, flags are associated with a player, or an NPC, or a block, or whatever else.

See also the guide page at 🔗https://guide.denizenscript.com/guides/basics/flags.html.

For non-persistent temporary memory, see instead Command:define.
For more generic memory options, see Command:yaml or Command:sql.

Flags can be sub-mapped with the '.' character, meaning a flag named 'x.y.z' is actually a flag 'x' as a MapTag with key 'y' as a MapTag with key 'z' as the final flag value.
In other words, "<server.flag[a.b.c]>" is equivalent to "<server.flag[a].get[b].get[c]>"

Server flags can be set by specifying 'server' as the object, essentially a global flag target, that will store data in the file "plugins/Denizen/server_flags.dat"

Most unique object types are flaggable - refer to any given object type's language documentation for details.

Most flag sets are handled by Command:flag, however some non-unique objects (such as items) are flagged with specialty commands or tags unique to the type.
Any supported object type, including the 'server' base tag, can use the tags
Tag:FlaggableObject.flag, Tag:FlaggableObject.has_flag, Tag:FlaggableObject.flag_expiration, Tag:FlaggableObject.list_flags.

Flags have an expiration system, which is used by specifying a time at which they should expire (or via a duration which internally calculates the date/time of expiration by adding the duration input to the current date/time).
Expirations are then *checked for* in flag tags - meaning, the flag tags will internally compare a stored date/time against the real current date/time,
and if the flag's expiration time is in the past, the flag tag will return values equivalent to if the flag doesn't exist.
There is no system actively monitoring for flag expirations or applying them. There is no event for expirations occurring, as they don't "occur" per se.
In other words, it is correct to say a flag "is expired" or a flag "is not expired",
but it is incorrect to say a flag "expires", as it is not an active action (though this wording can be convenient when speaking informally).
Expired flags are sometimes 'cleaned up' (meaning, any expired flags get actually removed from internal storage), usually when a flag save file is loaded into the server.

As a bonus feature-combo, it is possible to transmit sets of flags exactly in-place and reapply them, this is particular useful for example to synchronize player data across Bungee servers.
To do this, you can read raw flag data with the tag Tag:FlaggableObject.flag_map and the '__raw' prefix in a flag command. For example:

# Gather the original data
- define playerdata <player.flag_map[flag1|flag2|taco|potato|waffle|etc]>
# Now reapply it elsewhere (eg a different Bungee server)
- flag <player> __raw:<[playerdata]>


ItemTags, rather than using the flag command, are primarily flagged via Command:inventory with the 'flag' argument, or via Tag:ItemTag.with_flag, or via the item script container.

Additionally, flags be searched for with tags like Tag:server.online_players_flagged, Tag:server.players_flagged, Tag:server.spawned_npcs_flagged, Tag:server.npcs_flagged, ...
Flags can also be required by script event lines, as explained at Language:Script Event Switches.
Item flags can also be used as a requirement in Command:take.

Note that some internal flags exist, and are prefixed with '__' to avoid conflict with normal user flags.
This includes:
- '__raw' and '__clear' which are part of a fake-flag system used for forcibly setting raw data to a flaggable object,
- '__scripts', '__time', etc. which is where some object-type flags are stored inside of server flags,
- '__interact_step' which is used for interact script steps, related to Command:zap,
- '__interact_cooldown' which is used for interact script cooldowns, related to Command:cooldown.
GroupDenizen Scripting Language
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/core/FlagCommand.java#L34
NameInventory Actions
DescriptionUsed by some inventory world events to describe the action of the inventory event.

Actions, as described by the bukkit javadocs:
CLONE_STACK
A max-size stack of the clicked item is put on the cursor.
COLLECT_TO_CURSOR
The inventory is searched for the same material, and they are put on the cursor up to
MaterialTag.max_stack_size.
DROP_ALL_CURSOR
The entire cursor item is dropped.
DROP_ALL_SLOT
The entire clicked slot is dropped.
DROP_ONE_CURSOR
One item is dropped from the cursor.
DROP_ONE_SLOT
One item is dropped from the clicked slot.
HOTBAR_MOVE_AND_READD
The clicked item is moved to the hotbar, and the item currently there is re-added to the
player's inventory.
HOTBAR_SWAP
The clicked slot and the picked hotbar slot are swapped.
MOVE_TO_OTHER_INVENTORY
The item is moved to the opposite inventory if a space is found.
NOTHING
Nothing will happen from the click.
PICKUP_ALL
All of the items on the clicked slot are moved to the cursor.
PICKUP_HALF
Half of the items on the clicked slot are moved to the cursor.
PICKUP_ONE
One of the items on the clicked slot are moved to the cursor.
PICKUP_SOME
Some of the items on the clicked slot are moved to the cursor.
PLACE_ALL
All of the items on the cursor are moved to the clicked slot.
PLACE_ONE
A single item from the cursor is moved to the clicked slot.
PLACE_SOME
Some of the items from the cursor are moved to the clicked slot (usually up to the max stack size).
SWAP_WITH_CURSOR
The clicked item and the cursor are exchanged.
UNKNOWN
An unrecognized ClickType.
GroupUseful Lists
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerClicksInInventoryScriptEvent.java#L20
NameInventory Script Containers
DescriptionInventory script containers are an easy way to pre-define custom inventories for use within scripts.
Inventory scripts work with the InventoryTag object, and can be fetched with the Object Fetcher by using the
InventoryTag constructor InventoryTag_script_name.

Example: - inventory open d:MyInventoryScript

The following is the format for the container.

The 'inventory:' key is required, other keys vary based on the type.
Some types will require you define either 'size:' or 'slots:' (or both).
'Procedural items:' and 'definitions:' are optional, and should only be defined if needed.


# The name of the script is the same name that you can use to construct a new
# InventoryTag based on this inventory script. For example, an inventory script named 'Super_Cool_Inventory'
# can be referred to as 'Super_Cool_Inventory'.
Inventory_Script_Name:

    type: inventory

    # Must be a valid inventory type.
    # Valid inventory types: ANVIL, BREWING, CHEST, DISPENSER, ENCHANTING, ENDER_CHEST, HOPPER, WORKBENCH
    # | All inventory scripts MUST have this key!
    inventory: inventory type

    # The title can be anything you wish. Use color tags to make colored titles.
    # Note that titles only work for some inventory types, including ANVIL, CHEST, DISPENSER, FURNACE, ENCHANTING, HOPPER, WORKBENCH
    # | MOST inventory scripts should have this key!
    title: custom title

    # The size must be a multiple of 9. It is recommended to not go above 54, as it will not show correctly when a player looks into it.
    # | Some inventory scripts should have this key! Most can exclude it if 'slots' is used.
    size: 27

    # Set 'gui' to 'true' to indicate that the inventory is a GUI, meaning it's a set of buttons to be clicked, not a container of items.
    # This will prevent players from taking items out of or putting items into the inventory.
    # | SOME inventory scripts should have this key!
    gui: true

    # You can use definitions to define items to use in the slots. These are not like normal script definitions, and do not need to be in a definition tag.
    # | Some inventory scripts MAY have this key, but it is optional. Most scripts will just specify items directly.
    definitions:
        my item: ItemTag
        other item: ItemTag

    # Procedural items can be used to specify a list of ItemTags for the empty slots to be filled with.
    # Each item in the list represents the next available empty slot.
    # When the inventory has no more empty slots, it will discard any remaining items in the list.
    # A slot is considered empty when it has no value specified in the slots section.
    # If the slot is filled with air, it will no longer count as being empty.
    # | Most inventory scripts should exclude this key, but it may be useful in some cases.
    procedural items:
    - define list <list>
    - foreach <server.online_players>:
        # Insert some form of complex doesn't-fit-in-just-a-tag logic here
        - define item <[value].skull_item>
        - define list:->:<[item]>
    - determine <[list]>

    # You can specify the items in the slots of the inventory. For empty spaces, simply put an empty "slot" value, like "[]".
    # | Most inventory scripts SHOULD have this key!
    slots:
    - [] [] [] [my item] [ItemTag] [] [other item] [] []
    - [my item] [] [] [] [] [ItemTag] [ItemTag] [] []
    - [] [] [] [] [] [] [] [] [other item]
GroupScript Container System
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/containers/core/InventoryScriptContainer.java#L26
NameMap Script Containers
DescriptionMap scripts allow you define custom in-game map items, for usage with the map command.

The following is the format for the container.


# The name of the map script is used by the map command.
Map_Script_Name:

    type: map

    # Whether to display the original map below the custom values. Defaults to true.
    # | Some map scripts should have this key!
    original: true/false

    # Whether to constantly update things. Defaults to true.
    # | Some map scripts should have this key!
    auto update: true

    # Whether this map script renders uniquely per-player. Defaults to true.
    # | Some map scripts should have this key!
    contextual: true

    # Lists all contained objects.
    # | Most map scripts should have this key!
    objects:

        # The first object...
        1:
            # Specify the object type
            # Type can be IMAGE, TEXT, CURSOR, or DOT.
            type: image
            # Specify an HTTP url or file path within Denizen/images/ for the image. Supports animated .gif!
            image: my_image.png
            # Optionally add width/height numbers.
            width: 128
            height: 128
            # Specify a tag to show or hide custom content! Valid for all objects.
            # Note that all inputs other than 'type' for all objects support tags that will be dynamically reparsed per-player each time the map updates.
            visible: <player.name.contains_text[bob].not>

        2:
            type: text
            # Specify any text to display. Color codes not permitted (unless you know how to format CraftMapCanvas byte-ID color codes).
            text: Hello <player.name>
            # Specify the color of the text as any valid ColorTag.
            color: red
            # | Optionally, specify the following additional options:
            # Specify a font to use, which allows using special characters/other languages the default font may not support.
            font: arial
            # Specify a text size (only available with a custom font).
            size: 18
            # Specify a style, as a list that contains either "bold", "italic", or both (only available with a custom font).
            style: bold|italic
        3:
            type: cursor
            # Specify a cursor type
            cursor: red_marker
            # Optionally, specify a cursor direction. '180' seems to display as up-right usually.
            direction: 180
            # Supported on all objects: x/y positions, and whether to use worldly or map coordinates.
            x: 5
            # If 'world_coordinates' is set to 'true', the 'y' value corresponds to the 'z' value of a location.
            y: 5
            # If true: uses world coordinates. If false: uses map local coordinates. (Defaults to false).
            world_coordinates: false
            # If true: when the object goes past the edge, will stay in view at the corner. If false: disappears past the edge (defaults to false).
            show_past_edge: false

        4:
            type: dot
            # Specify the radius of the dot.
            radius: 1
            # Specify the color of the dot as any valid ColorTag.
            color: red



A list of cursor types is available through Tag:server.map_cursor_types.
GroupScript Container System
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/containers/core/MapScriptContainer.java#L23
NameMythicMobs Bridge
DescriptionIn addition to the tags, commands, and events found by searching for "mythicmobs" throughout the meta documentation,
Depenizen adds 4 new Denizen matchers, and additional features to Mythic Mobs: 2 Targeters, and a Condition.

Depenizen provides additional ObjectType:EntityTag and ObjectType:ItemTag matchers to match MythicMobs mobs/items:
- "mythic_mob" plaintext EntityTag matcher, matches if the entity is a mythic mob.
- "mythic_mob:<MythicMobID>" EntityTag matcher, matches if the entity is a mythic mob, and its ID matches the advanced matcher specified.
- "mythic_item" plaintext ItemTag matcher, matches if the item is a mythic item.
- "mythic_item:<MythicItemID>" ItemTag matcher, matches if the item is a mythic item, and its ID matches the advanced matcher specified.

Depenizen provides two additional targeters via the MythicMobs API: @DenizenEntity is an entity-based targeter, @DenizenLocation is a location-based targeter.
Both targeters can parse tags; they accept input of either an EntityTag or LocationTag respectively.
Both targeters also support returning ListTags containing their respective tag types.
Both targeters provide <context.entity> as an EntityTag of the caster.

Conditions provide different contexts depending on their usage.
The syntax for calling a Denizen tag as a condition is DenizenCondition.
The tag should return an ElementTag of a boolean value (true or false).
<context.location> is available for location-based checks,
<context.entity> is available for entity-based and caster-based checks,
and <context.target> is available for target-based checks.
NOTE: TriggerConditions are NOT currently supported.

Note as well that many parts of MythicMobs configurations allow usage of PlaceholderAPI, which means you can use the "denizen_" placeholder to read tags in any such parts,
refer to Language:PlaceholderAPI Bridge for more information.

Usage Examples

Example 1: @DenizenEntity{tag=<context.entity.location.find_players_within[30].filter[has_flag[marked]]>}

Example 2: @DenizenLocation{tag=<context.entity.location.find.surface_blocks.within[30].random[5]>}

Example 3: @DenizenEntity{tag=<proc[SomeProcScript]>}

Conditions:
- denizencondition{tag=<context.entity.location.find_players_within[30].is_empty.not>}
GroupDepenizen Bridges
RequiresDepenizen, MythicMobs
Sourcehttps://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/utilities/mythicmobs/MythicMobsLoaders.java#L20
NameObjectTags
DescriptionObjectTags are a system put into place by Denizen that make working with things, or 'objects',
in Minecraft and Denizen easier. Many parts of scripts will require some kind of object as an
argument, identifier/type, or such as in world events, part of an event name. The ObjectTags notation
system helps both you and Denizen know what type of objects are being referenced and worked with.

So when should you use ObjectTags? In arguments, event names, replaceable tags, configs, flags, and
more! If you're just a beginner, you've probably been using them without even realizing it!

ObjectTag is a broader term for a 'type' of object that more specifically represents something,
such as a LocationTag or ScriptTag, often times just referred to as a 'location' or 'script'. Denizen
employs many object types that you should be familiar with. You'll notice that many times objects
are referenced with their 'ObjectTag notation' which is in the format of 'x@', the x being the specific
notation of an object type. Example: player objects use the p@ notation, and locations use l@.
This notation is automatically generated when directly displaying objects, or saving them into data files.
It should never be manually typed into a script.

Let's take the tag system, for example. It uses the ObjectTags system pretty heavily. For instance,
every time you use <player.name> or <npc.id>, you're using a ObjectTag, which brings us to a simple
clarification: Why <player.name> and not <PlayerTag.name>? That's because Denizen allows Players,
NPCs and other 'in-context objects' to be linked to certain scripts. In short, <player> already
contains a reference to a specific player, such as the player that died in a world event 'on player dies'.
<PlayerTag.name> is instead the format for documentation, with "PlayerTag" simply indicating 'any player object here'.

ObjectTags can be used to CREATE new instances of objects, too! Though not all types allow 'new'
objects to be created, many do, such as ItemTags. With the use of tags, it's easy to reference a specific
item, say -- an item in the Player's hand -- items are also able to use a constructor to make a new item,
and say, drop it in the world. Take the case of the command/usage '- drop diamond_ore'. The item object
used is a brand new diamond_ore, which is then dropped by the command to a location of your choice -- just
specify an additional location argument.

There's a great deal more to learn about ObjectTags, so be sure to check out each object type for more
specific information. While all ObjectTags share some features, many contain goodies on top of that!
GroupObject System
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/utilities/CommonRegistries.java#L29
NamePlayer Entity Skins (Skin Blobs)
DescriptionPlayer entities (that is, both real players and player-type NPCs), in addition to Player_Head items,
use something called a "skin blob" to determine what skin to show.
A skin blob consists of an identifier (usually the player's UUID, sometimes the name), a "texture", and a "signature".

The "texture" portion, despite the name, does not contain actual texture data - it contains a Base64 encoding of a JSON section that contains outlinks to real skin data.
That might be a bit confusing, so here's an example:

The raw "texture" data for "mcmonkey4eva"'s skin is:
eyJ0aW1lc3RhbXAiOjE1NjU1NjUyNDA4NTMsInByb2ZpbGVJZCI6IjQ2MGU5NmI5N2EwZTQxNmRiMmMzNDUwODE2NGI4YjFiIiwicHJvZmlsZU5hbWUiOiJtY21vbmtleTRldmEiLCJzaWduYXR1cmVSZXF1aXJlZCI6dHJ1ZSwidGV4dH
VyZXMiOnsiU0tJTiI6eyJ1cmwiOiJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlL2ZkMzRiM2UyN2EzZmU1MzgyN2IzN2FkNTk1NmFjY2EwOGYyODYzYzY5MjZjYzk3MTE2ZGRhMzM0ODY5N2E1YTkifX19

This is base64 encoding, which is just a way of controlling the format of binary data. When passed through a Base64 decoder, that says:
{"timestamp":1565565240853,"profileId":"460e96b97a0e416db2c34508164b8b1b","profileName":"mcmonkey4eva","signatureRequired":true,
"textures":{"SKIN":{"url":"http://textures.minecraft.net/texture/fd34b3e27a3fe53827b37ad5956acca08f2863c6926cc97116dda3348697a5a9"}}}

As you can see, it contains: the timestamp of when the skin was added, the UUID and name, and a link to the actual skin file on Mojang's servers.

The "signature" portion is a digitally encrypted signature that is used to verify a skin really was generated by Mojang.
It is also represented as Base64, but cannot be decoded to anything readable.
The "signature" is required for Player entity skins, but can generally be left off from Player_Head items (meaning, you can generate your own Player_Head items by base64 encoding your own JSON).

The website 🔗https://mineskin.org/ can be used to generate full texture+signature data from any skin file
(it does this by automatically uploading the skin image to Mojang's servers for processing and signing, using a donated Minecraft account).

In terms of general actual usage, skin blobs are generally meant to be read from tags and applied with mechanisms, never directly written out or read by a human, due to their complexity.

A skin_blob always represents a single actual skin, as opposed to a player name/uuid, where the account owner might choose to change their skin.

It should be noted that any time a skin is applied to a Player, NPC, Or Player_Head item using just a name or UUID, the server must contact Mojang's servers to requst the skin blob for that given name/uuid.
With a skin blob, however, the server does not need to make any remote calls, and can apply the skin directly (However note that the client will still download the image from Mojang's servers).
GroupMinecraft Logic
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/nms/abstracts/ProfileEditor.java#L54
NameRaw NBT Encoding
DescriptionSeveral things in Minecraft use NBT to store data, such as items and entities.
For the sake of inter-compatibility, a special standard format is used in Denizen to preserve data types.
This system exists in Denizen primarily for the sake of compatibility with external plugins/systems.
It should not be used in any scripts that don't rely on data from external plugins.

NBT Tags are encoded as follows:
CompoundTag: (a fully formed MapTag)
ListTag: list:(NBT type-code):(a fully formed ListTag)
ByteArrayTag: byte_array:(a pipe-separated list of numbers)
IntArrayTag: int_array:(a pipe-separated list of numbers)
ByteTag: byte:(#)
ShortTag: short:(#)
IntTag: int:(#)
LongTag: long:(#)
FloatTag: float:(#)
DoubleTag: double:(#)
StringTag: string:(text here)
EndTag: end
GroupUseful Lists
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemRawNBT.java#L111
NameSafety In Events
DescriptionOne of the more common issues in Denizen scripts (particularly ones relating to inventories) is
*event safety*. That is, using commands inside an event that don't get along with the event.

The most common example of this is editing a player's inventory, within an inventory-related event.
Generally speaking, this problem becomes relevant any time an edit is made to something involved with an event,
within the firing of that event.
Take the following examples:

on player clicks in inventory:
- take iteminhand
on entity damaged:
- remove <context.entity>


In both examples above, something related to the event (the player's inventory, and the entity being damaged)
is being modified within the event itself.
These break due a rather important reason: The event is firing before and/or during the change to the object.
Most events operate this way. A series of changes *to the object* are pending, and will run immediately after
your script does... the problems resultant can range from your changes being lost to situational issues
(eg an inventory suddenly being emptied entirely) to even server crashes!
The second example event also is a good example of another way this can go wrong:
Many scripts and plugins will listen to the entity damage event, in ways that are simply unable to handle
the damaged entity just being gone now (when the event fires, it's *guaranteed* the entity is still present
but that remove command breaks the guarantee!).

The solution to this problem is simple: Use "after" instead of "on".

after player clicks in inventory:
- take iteminhand
after entity damaged:
- if <context.entity.is_spawned||false>:
  - remove <context.entity>

This will delay the script until *after* the event is complete, and thus outside of the problem area.
And thus should be fine. One limitation you should note is demonstrated in the second example event:
The normal guarantees of the event are no longer present (eg that the entity is still valid) and as such
you should validate these expectations remain true after the event (as seen with the 'if is_spawned' check).
(See also Language:Script Event After vs On)

If you need determine changes to the event, you can instead use 'on' but add a 'wait 1t' after the determine but before other script logic.
This allows the risky parts to be after the event and outside the problem area, but still determine changes to the event.
Be sure to use 'passively' to allow the script to run in full.

on player clicks in inventory:
- determine passively cancelled
- wait 1t
- take iteminhand
on entity damaged:
- determine passively cancelled
- wait 1t
- if <context.entity.is_spawned||false>:
  - remove <context.entity>
GroupScript Events
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/BukkitScriptEvent.java#L1014
NameSlot Inputs
DescriptionWhenever a script component requires a slot ID (such as the take command, when using '- take slot:#')
you can give the slot ID input as either a number of the 1-based index (where the first slot is 1, the second is 2, etc.)
If the slot given is 'hand', for a player the held item slot will be used, for any other entity the slot will be 1.
OR you can give the following names (valid for player inventories only):
BOOTS: equivalent to 37
LEGGINGS: equivalent to 38
CHESTPLATE: equivalent to 39
HELMET: equivalent to 40
OFFHAND: equivalent to 41

Note that some common alternate spellings may be automatically accepted as well.
GroupUseful Lists
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/utilities/inventory/SlotHelper.java#L72
NameThe Player and NPC Arguments
DescriptionThe "player:<player>" and "npc:<npc>" arguments are special meta-arguments that are available for all commands, but are only useful for some.
They are written like:
- give stick player:<server.flag[some_player]>
or:
- sit npc:<entry[save].created_npc>

Denizen tracks a "linked player" and a "linked NPC" in queues and the commands within.
Many commands automatically operate on the linked player/NPC default or exclusively
(for example, "give" defaults to giving items to the linked player but that can be changed with the "to" argument,
"sit" exclusively makes the linked NPC sit, and that cannot be changed except by the global NPC argument).

When the player argument is used, it sets the linked player for the specific command it's on.
This is only useful for commands that default to operating on the linked player.
This can also be useful with the "run" command to link a specific player to the new queue.

The NPC argument is essentially equivalent to the player argument, but for the linked NPC instead of the linked player.

These arguments will also affect tags (mainly "<player>" and "<npc>") in the same command line (regardless of argument order).
If you need to use the original player/NPC in a tag on the same line, use the define command to track it.

You can also modify the linked player or NPC for an entire queue using the fake-definitions '__player' and '__npc', for example:

- foreach <server.players> as:__player:
    - narrate "Hi <player.name> isn't it nice how the player is linked here"
GroupScript Command System
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/utilities/implementation/DenizenCoreImplementation.java#L107
NameUnique Objects vs Generic Objects
DescriptionThere are a lot of object types in the Denizen object system, and not all of them behave the same way.
It can be useful to separate object types into categories to better understand how objects work, and how Denizen as a whole works.
While there are some hardlined separations, there are also some generalizations that don't necessarily hold exactly, but are still helpful.
One such generalization is the separation between Unique and Generic object types.

A UNIQUE object is the way you might assume all objects are.
Unique objects most notably include EntityTag objects and the derivative NPCTag / PlayerTag objects.
An entity object identifies in a form like 'e@<uuid>', where '<uuid>' is some unique ID that looks something like 'abc123-4d5e6f'.
This ID is randomly generated by the Minecraft server and is used to identify that one entity in the world separately from any other.
'e@abc123' is not "a creeper" to the engine, it is "that specific creeper over there".
An object that is unique must have some way to specify the exact single instance of it in the world, like the UUID used by entities.

A GENERIC object can be said to be a 'description' of a unique object.
A generic form of an EntityTag might look like 'e@creeper'.
Instead of "that specific creeper over there", it is instead "the concept of a creeper mob".
There is no way for the engine to read only the word 'creeper' and find out which specific creeper in the world it came from...
it could be any of them, there's often hundreds of creepers spawned somewhere in the world at any time.
Objects like items and materials are always generic. There is no unique identifier for any item, there is only the description.
An item usually looks something like 'i@stick'.
ItemTag objects can include more detail, like 'i@stick[lore=hi;display_name=My Stick;enchantments=[sharpness=5]]'...
but this is still just a description, and there could still be many items out there that match this description.

The consequences of this mostly relate to:
- How you adjust an object (eg change the lore of an item, or teleport an entity).
For example: you can't teleport the generic concept of a creeper, but you can certainly teleport a specific single creeper in the world.
- How reliable tags on the object are.
For example: the result of 'ItemTag.lore' on the item 'i@stick[lore=hi]' will always be 'hi' (because ItemTags are generic),
but the result of 'EntityTag.location' on the entity 'e@abc123' will change every tick as the entity moves,
or even become invalid if the entity dies (because that EntityTag is unique).

Here's where the separation gets muddy:
First, as mentioned, an EntityTag can either be unique ('e@abc123', 'n@42', etc.) OR generic ('e@creeper', 'e@zombie[custom_name=Bob]', etc).
Second, some object types exhibit a bit of both.

For example, a LocationTag refers to a unique block in the world (like, 'l@1,2,3,world' is always that specific block at that position),
but also is a generic object in terms of the location object itself - if for example you want to change the angle of a location,
you have to essentially 'create' a new location, that is an exact copy of the previous one but with a new yaw or pitch value.
GroupObject System
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/ObjectTag.java#L43
NameVirtual Inventories
DescriptionVirtual inventories are inventories that have no attachment to anything within the world of Minecraft.
They can be used for a wide range of purposes - from looting fallen enemies to serving as interactive menus with item 'buttons'.

In Denizen, all noted inventories (saved by the Note command) are automatically converted into a virtual copy of the saved inventory.
This enables you to open and edit the items inside freely, with automatic saving, as if it were a normal inventory.

Noting is not the only way to create virtual inventories, however.
Using 'generic' along with inventory properties will allow you to create temporary custom inventories to do with as you please.
The properties that can be used like this are:

size=<size>
contents=<item>|...
title=<title>
holder=<inventory type>

For example, the following task script opens a virtual inventory with 18 slots,
where the second slot is a snowball, all the rest are empty, and the title is "My Awesome Inventory" with some colors in it.

open random inventory:
  type: task
  script:
  - inventory open "d:generic[size=18;title=<red>My <green>Awesome <blue>Inventory;contents=air|snowball]"
GroupInventory System
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/item/InventoryCommand.java#L65

Mechanism


Namecustom_name
ObjectEntityTag
InputElementTag
Related Tags<EntityTag.custom_name> Returns the entity's custom name (as set by plugin or name tag item), if any.
DescriptionSets the custom name (equivalent to a name tag item) of the entity.
Provide no input to remove the custom name.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityCustomName.java#L60
Namedisabled_slots
ObjectEntityTag
InputMapTag
Related Tags<EntityTag.disabled_slots_data> If the entity is an armor stand, returns its disabled slots as a map of slot names to list of actions.
DescriptionSets the disabled slots of an armor stand as a map of slot names to list of actions.
For example: [HEAD=PLACE|REMOVE;CHEST=PLACE;FEET=ALL]
Provide no input to enable all slots.
Slots: 🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/EquipmentSlot.html
Actions: ALL, REMOVE, PLACE
NOTE: Minecraft contains a bug where disabling ALL for the HAND slot still allows item removal.
To fully disable hand interaction, disable ALL and REMOVE.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityDisabledSlots.java#L159
Namedisplay
ObjectEntityTag
InputElementTag
Related Tags<EntityTag.display> (Property) For an item display entity this is the model transform it will display, can be any of 🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/ItemDisplay.ItemDisplayTransform.html. (...)
Description(Property) For an item display entity this is the model transform it will display, can be any of 🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/ItemDisplay.ItemDisplayTransform.html.
For a text display entity this is its text alignment, can be any of 🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/TextDisplay.html.
Synonyms (Search Aid)entitytag.display_transform, entitytag.text_alignment
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityDisplay.java#L11
Namedrinking_potion
ObjectEntityTag
InputItemTag
Related Tags<EntityTag.drinking_potion> Returns the potion item a witch is drinking, or air if none.
DescriptionSets the potion item a witch is drinking.
Generated Example
- adjust <player> drinking_potion:stick
Groupproperties
RequiresPaper
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/properties/EntityDrinkingPotion.java#L86
Nameequipment_drop_chance
ObjectEntityTag
InputMapTag
Related Tags<EntityTag.equipment_drop_chance> (Property) Returns the chance of each piece of equipment dropping when the entity dies. (...)
Description(Property) Sets the chance of each piece of equipment dropping when the entity dies.
A drop chance of 0 will prevent the item from dropping, a drop chance of 1 will always drop the item if killed by a player, and a drop chance of higher than 1 will always drop the item no matter what the entity was killed by.
A map of equipment slots to drop chances, with keys "head", "chest", "legs", "feet", "hand", and "off_hand".
Example
# Use to prevent a zombie from dropping any of its equipped items, no matter what:
- adjust <[zombie]> equipment_drop_chance:[head=0;chest=0;legs=0;feet=0;hand=0;off_hand=0]
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityEquipmentDropChance.java#L12
Namefake_pickup
ObjectEntityTag
InputEntityTag
DescriptionMakes it look like this entity (usually a player) has picked up another entity (item, arrow, or XP orb).
This technically also works with any entity type.
Note that the original entity doesn't actually get picked up, it's still there, just invisible now.
Generated Example
- adjust <player> fake_pickup:<player>
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EntityTag.java#L4509
Namefixed
ObjectEntityTag
InputElementTag(Boolean)
Related Tags<EntityTag.fixed> Returns whether the item frame is fixed. (Meaning, it can't be altered by players or broken by block obstructions).
DescriptionSets whether this item frame is fixed. (Meaning, it can't be altered by players or broken by block obstructions).
Generated Example
- adjust <player> fixed:false
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityFixed.java#L76
Nameframed
ObjectEntityTag
InputItemTag(|ElementTag)
Related Tags<EntityTag.has_framed_item> If the entity is an item frame, returns whether the frame has an item in it.
<EntityTag.framed_item> If the entity is an item frame, returns the item currently framed.
<EntityTag.framed_item_rotation> If the entity is an item frame, returns the rotation of the item currently framed.
DescriptionSets the entity's framed item and optionally the rotation as well.
Valid rotations: 🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Rotation.html
For example: framed:diamond_sword|clockwise
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityFramed.java#L131
Nameinventory_contents
ObjectEntityTag
InputListTag(ItemTag)
Related Tags<EntityTag.inventory> Returns the entity's inventory, if it has one.
<InventoryTag.list_contents> Returns a list of all items in the inventory.
DescriptionClears the entity's inventory and sets it's item list to match the input.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityInventory.java#L84
Namepickup_delay
ObjectEntityTag
InputDurationTag
Related Tags<EntityTag.pickup_delay> Returns how long before the item-type entity can be picked up by a player.
DescriptionSets the pickup delay of this Item Entity.
Generated Example
- adjust <player> pickup_delay:12h
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EntityTag.java#L3978
Namepotion
ObjectEntityTag
InputItemTag
Related Tags<EntityTag.potion> (Property) Deprecated in favor of Property:EntityTag.potion_type for arrows, and Property:EntityTag.item for splash potions.
Description(Property) Deprecated in favor of Property:EntityTag.potion_type for arrows, and Property:EntityTag.item for splash potions.
Generated Example
- adjust <player> potion:<player.item_in_hand>
GroupProperties
Deprecateduse 'EntityTag.potion_type' for arrows, and 'EntityTag.item' for splash potions.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityPotion.java#L19
Namepotion_effects
ObjectEntityTag
InputListTag
Related Tags<EntityTag.effects_data> Returns the active potion effects on the entity, or the potion effects an arrow/area effect cloud will apply. (...)
<EntityTag.has_effect[<effect>]> Returns whether the entity has a specified effect, or whether an arrow/area effect cloud will apply a certain effect. (...)
DescriptionSet the entity's active potion effects, or the potion effects an arrow/area effect cloud will apply.
Each item in the list must be a MapTag in Language:Potion Effect Format.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityPotionEffects.java#L169
Namepotion_type
ObjectEntityTag
InputElementTag
Related Tags<EntityTag.potion_type> (Property) Returns an Arrow or Area Effect Cloud's base potion type, if any. (...)
Description(Property) Sets an Arrow or Area Effect Cloud's base potion type, if any.
See 🔗https://minecraft.wiki/w/Potion#Item_data for a list of potion types.
See Property:EntityTag.potion_effects to control the potion effects applied.
Specify no input to remove the base potion type.
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityPotionType.java#L13
Nameredo_attack_cooldown
ObjectEntityTag
InputNone
Related Tags<EntityTag.attack_cooldown_duration> Returns the amount of time that passed since the start of the attack cooldown.
<EntityTag.attack_cooldown_max_duration> Returns the maximum amount of time that can pass before the player's main hand has returned (...)
<EntityTag.attack_cooldown_percent> Returns the progress of the attack cooldown. 0 means that the attack cooldown has just (...)
DescriptionForces the player to wait for the full attack cooldown duration for the item in their hand.
NOTE: The clientside attack cooldown indicator will not reflect this change!
Generated Example
- adjust <player> redo_attack_cooldown
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EntityTag.java#L4392
Nametime_lived
ObjectEntityTag
InputDurationTag
Related Tags<EntityTag.time_lived> Returns how long the entity has lived.
DescriptionSets the amount of time this entity has lived for.
For entities that automatically despawn such as dropped_items or falling_blocks, it can be useful to set this value to "-2147483648t" (the minimum valid number of ticks) to cause it to persist indefinitely.
For falling_block usage, see also Mechanism:EntityTag.auto_expire
Generated Example
- adjust <player> time_lived:5m
Synonyms (Search Aid)entitytag.age_nbt, entitytag.time_nbt
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EntityTag.java#L3650
Namevisible
ObjectEntityTag
InputElementTag(Boolean)
Related Tags<EntityTag.visible> Returns whether the entity is visible. (...)
DescriptionSets whether the entity is visible.
Supports armor stands, item frames, and living entities.
Generated Example
- adjust <player> visible:true
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityVisible.java#L73
Namecontents
ObjectInventoryTag
InputListTag(ItemTag)
Related Tags<InventoryTag.list_contents> Returns a list of all items in the inventory.
<InventoryTag.list_contents.simple> Returns a list of all items in the inventory, without item properties.
<InventoryTag.list_contents.with_lore[<lore>]> Returns a list of all items in the inventory with the specified (...)
<InventoryTag.list_contents.with_lore[<lore>].simple> Returns a list of all items in the inventory with the specified (...)
DescriptionSets the contents of the inventory.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/inventory/InventoryContents.java#L185
Namefuel
ObjectInventoryTag
InputItemTag
Related Tags<InventoryTag.fuel> Returns the item currently in the fuel section of a furnace or brewing stand inventory.
DescriptionSets the item in the fuel slot of this furnace or brewing stand inventory.
Generated Example
- adjust <player.inventory> fuel:stick
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L2452
Nameinput
ObjectInventoryTag
InputItemTag
Related Tags<InventoryTag.input> Returns the item currently in the smelting slot of a furnace inventory, or the ingredient slot of a brewing stand inventory.
DescriptionSets the item in the smelting slot of a furnace inventory, or ingredient slot of a brewing stand inventory.
Generated Example
- adjust <player.inventory> input:stick
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L2473
Namematrix
ObjectInventoryTag
InputListTag(ItemTag)
Related Tags<InventoryTag.matrix> Returns the items currently in a crafting inventory's matrix.
DescriptionSets the items in the matrix slots of this crafting inventory.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L2404
Namereformat
ObjectInventoryTag
InputElementTag
DescriptionReformats the contents of an inventory to ensure any items within will be stackable with new Denizen-produced items.
This is a simple handy cleanup tool that may sometimes be useful with Denizen updates.
This essentially just parses the item to Denizen text, back to an item, and replaces the slot.
Input can be "scripts" to only change items spawned by item scripts, or "all" to change ALL items.
Most users are recommended to only use "scripts".
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L2528
Nameresult
ObjectInventoryTag
InputItemTag
Related Tags<InventoryTag.result> Returns the item currently in the result section of a crafting inventory or furnace inventory.
DescriptionSets the item in the result slot of this crafting inventory or furnace inventory.
Generated Example
- adjust <player.inventory> result:stick
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L2428
Namejukebox_record
ObjectLocationTag
InputItemTag
Related Tags<LocationTag.jukebox_record> Returns the record item currently inside the jukebox. (...)
DescriptionSets the record item played by a jukebox. Give no input to set the jukebox to empty.
See also Mechanism:LocationTag.jukebox_play.
Generated Example
- adjust <player.location> jukebox_record:<player.item_in_hand>
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L5305
Namelock
ObjectLocationTag
InputElementTag
Related Tags<LocationTag.lock> Returns the password to a locked container.
<LocationTag.is_locked> Returns whether the container is locked.
<LocationTag.is_lockable> Returns whether the container is lockable.
DescriptionSets the container's lock password.
Locked containers can only be opened while holding an item with the name of the lock.
Leave blank to remove a container's lock.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L4814
Namemax_stack_size
ObjectMaterialTag
InputElementTag(Number)
Related Tags<MaterialTag.max_stack_size> Returns the maximum amount of this material that can be held in a stack.
DescriptionSets the maximum stack size for all items this material type.
Note that altering this will probably require a script performing "- inventory update" in the event "after player clicks in inventory:" to maintain sync.
The maximum the client will interact with is stacks of 64, however you can set the max up to 127 and the client will render it, but refuse to move stacks properly.
Generated Example
- adjust <material[stone]> max_stack_size:4
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/MaterialTag.java#L742
Namehologram_lines
ObjectNPCTag
InputListTag
Related Tags<NPCTag.hologram_lines> Returns the list of hologram lines attached to an NPC.
DescriptionSets the NPC's hologram lines.
Each item in the list can be either:
- An ElementTag for a permanent hologram line
- A map with "text" (ElementTag) and "duration" (DurationTag) keys for a temporary hologram line that will disappear after the specified duration
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/NPCTag.java#L1346
Nameadd_links
ObjectPlayerTag
InputListTag(MapTag)
DescriptionAdds the specified list of server links to the player. Each item in the list must be a MapTag in Language:Server Links Format.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L2698
Namefake_equipment
ObjectPlayerTag
InputEntityTag(|ElementTag|ItemTag)
DescriptionShows the player fake equipment on the specified living entity, which has no real non-visual effects.
Input is in the form Entity|Slot|Item, where the slot can be one of the following: HAND, OFF_HAND, BOOTS, LEGS, CHEST, HEAD
Optionally, exclude the slot and item to stop showing the fake equipment, if any, on the specified entity.
For example:
- adjust <player> fake_equipment:<[some_entity]>|chest|diamond_chestplate
- adjust <player> fake_equipment:<player>|head|jack_o_lantern
Consider instead using Command:fakeequip.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L3603
Namefirework_boost
ObjectPlayerTag
InputItemTag
DescriptionFirework boosts the player with the specified firework rocket.
The player must be gliding.
Generated Example
- adjust <player> firework_boost:iron_sword
Grouppaper
RequiresPaper
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/properties/PaperPlayerExtensions.java#L112
Namelinks
ObjectPlayerTag
InputListTag(MapTag)
DescriptionSends the specified list of server links to the player. This will override existing links player has.
Each item in the list must be a MapTag in Language:Server Links Format.
Generally prefer Mechanism:PlayerTag.add_links.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L2685
Nameresend_recipes
ObjectPlayerTag
InputNone
DescriptionSends the player a list of the full details of all recipes on the server.
This is useful when reloading new item scripts with custom recipes.
This will automatically resend discovered recipes at the same time (otherwise the player will seemingly have no recipes unlocked).
Generated Example
- adjust <player> resend_recipes
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L3783
Nameshow_book
ObjectPlayerTag
InputItemTag
DescriptionDisplays a book to a player. Must be a WRITTEN_BOOK item.
For simple usage, consider specifying a book script name as the input.
Generated Example
- adjust <player> show_book:iron_sword
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L3765
Nameadd_links
Objectserver
InputListTag(MapTag)
DescriptionAdds links to the default server links. Each item in the list must be a MapTag in Language:Server Links Format.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L2049
Namelinks
Objectserver
InputListTag(MapTag)
DescriptionSets the default server links. Each item in the list must be a MapTag in Language:Server Links Format.
Generally prefer Mechanism:server.add_links.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L2037
Namereset_recipes
Objectserver
InputNone
Related Tags<server.recipe_ids[(<type>)]> Returns a list of all recipe IDs on the server. (...)
DescriptionResets the server's recipe list to the default vanilla recipe list + item script recipes.
Generated Example
- adjust server reset_recipes
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L1900
Nameinputs
ObjectTradeTag
InputListTag(ItemTag)
Related Tags<TradeTag.inputs> (Property) Returns the items required to make a successful trade. Use an empty input to make the trade impossible. (...)
Description(Property) Sets the items required to make a successful trade. Use an empty input to make the trade impossible.
NOTE: If more than two items are specified, then only the first two items will be used.
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/trade/TradeInputs.java#L14
Nameresult
ObjectTradeTag
InputItemTag
Related Tags<TradeTag.result> (Property) Returns what the trade will give the player.
Description(Property) Sets what the trade will give the player.
Generated Example
- adjust <trade[trade[result=diamond;max_uses=10;inputs=stick]]> result:iron_sword
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/trade/TradeResult.java#L9

ObjectType


NameElementTag
Prefixel@
Identity FormatJust the plain text of the element value, no prefix or formatting.
DescriptionElementTags are simple objects that contain a simple bit of text.
Their main usage is within the replaceable tag system,
often times returned from the use of another tag that isn't returning a specific object type, such as a location or entity.
For example, <player.name> or <list[item1|item2|item3].comma_separated> will both return ElementTags.

Pluses to the ElementTag system is the ability to utilize its tag attributes,
which can provide a range of functionality that should be familiar from any other programming language,
such as 'to_uppercase', 'split', 'replace', 'contains', and many more.
See 'ElementTag.*' tags for more information.

While information fetched from other tags resulting in an ElementTag is often times automatically handled,
it may be desirable to utilize element attributes from text/numbers/etc. that aren't already an element object.
To accomplish this, the standard 'element' tag base can be used for the creation of a new element.
For example: <element[This_is_a_test].to_uppercase>
will result in the value 'THIS_IS_A_TEST'.

Note that while other objects often return their object identifier (p@, li@, e@, etc.), elements usually do not (except special type-validation circumstances).
They will, however, recognize the object notation "el@" if it is used.
MatchableElementTag matchers, often used as a default when other object types aren't available
"integer": plaintext: matches if the element is an integer number.
"decimal": plaintext: matches if the element is a decimal number.
"boolean": plaintext: matches if the element is a valid boolean ("true" or "false").
Extended ByAreaShopTag, BigDoorsDoorTag, FactionTag, GriefPreventionClaimTag, JobsJobTag, LibsDisguiseTag, LuckPermsGroupTag, LuckPermsTrackTag, PartyTag, MobArenaArenaTag, MythicMobsMobTag, MythicSpawnerTag, PlotSquaredPlotTag, PVPArenaArenaTag, ResidenceTag, ShopKeeperTag, SkillAPIClassTag, NationTag, TownTag, ViveCraftPlayerTag, WorldGuardRegionTag, DiscordBotTag, DiscordButtonTag, DiscordChannelTag, DiscordCommandTag, DiscordEmbedTag, DiscordGroupTag, DiscordInteractionTag, DiscordMessageTag, DiscordReactionTag, DiscordRoleTag, DiscordSelectionTag, DiscordTextInputTag, DiscordUserTag, BiomeTag, ChunkTag, CuboidTag, EllipsoidTag, EnchantmentTag, EntityTag, InventoryTag, ItemTag, LocationTag, MaterialTag, PluginTag, PolygonTag, TradeTag, WorldTag, BinaryTag, ColorTag, CustomObjectTag, DurationTag, ImageTag, JavaReflectedObjectTag, ListTag, MapTag, QuaternionTag, QueueTag, ScriptTag, SecretTag, TimeTag
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ElementTag.java#L30
NameEnchantmentTag
Prefixenchantment@
Base TypeElementTag
ImplementsFlaggableObject
Identity FormatThe identity format for enchantments is the vanilla ID, Denizen ID, or full key. Can also be constructed by Denizen script name.
For example, 'enchantment@sharpness', 'enchantment@my_custom_ench', or 'enchantment@otherplugin:customench'.
DescriptionAn EnchantmentTag represents an item enchantment abstractly (the enchantment itself, like 'sharpness', which *can be* applied to an item, as opposed to the specific reference to an enchantment on a specific item).
For enchantment names, check 🔗https://minecraft.wiki/w/Enchanting#Summary_of_enchantments. Note spaces should swapped to underscores, so for example "Aqua Affinity" becomes "aqua_affinity".

This object type is flaggable.
Flags on this object type will be stored in the server saves file, under special sub-key "__enchantments"
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EnchantmentTag.java#L28
NameEntityTag
Prefixe@
Base TypeElementTag
ImplementsFlaggableObject, PropertyHolderObject
Identity FormatThe identity format for entities is a spawned entity's UUID, or an entity type.
For example, 'e@abc123' or 'e@zombie'.
DescriptionAn EntityTag represents a spawned entity, or a generic entity type.

Note that players and NPCs are valid EntityTags, but are generally represented by the more specific
PlayerTag and NPCTag objects.

Note that a spawned entity can be a living entity (a player, NPC, or mob) or a nonliving entity (a painting, item frame, etc).

This object type is flaggable.
Flags on this object type will be stored in the world chunk files as a part of the entity's NBT.
MatchableEntityTag matchers, sometimes identified as "<entity>", "<projectile>", or "<vehicle>":
"entity" plaintext: always matches.
"player" plaintext: matches any real player (not NPCs).
"npc" plaintext: matches any Citizens NPC.
"vehicle" plaintext: matches for any vehicle type (minecarts, boats, horses, etc).
"fish" plaintext: matches for any fish type (cod, pufferfish, etc).
"projectile" plaintext: matches for any projectile type (arrow, trident, fish hook, snowball, etc).
"hanging" plaintext: matches for any hanging type (painting, item_frame, etc).
"monster" plaintext: matches for any monster type (creepers, zombies, etc).
"animal" plaintext: matches for any animal type (pigs, cows, etc).
"mob" plaintext: matches for any mob type (creepers, pigs, etc).
"living" plaintext: matches for any living type (players, pigs, creepers, etc).
"vanilla_tagged:<tag_name>": matches if the given vanilla tag applies to the entity. Allows advanced matchers, for example: "vanilla_tagged:axolotl_*".
"entity_flagged:<flag>": a Flag Matchable for EntityTag flags.
"player_flagged:<flag>": a Flag Matchable for PlayerTag flags (will never match non-players).
"npc_flagged:<flag>": a Flag Matchable for NPCTag flags (will never match non-NPCs).
"npc_<type>": matches if the NPC is the given entity type (like "npc_cow" or "npc_mob" or "npc_player").
Any entity type name: matches if the entity is of the given type, using advanced matchers.
Extended ByNPCTag, PlayerTag
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EntityTag.java#L65
NameMaterialTag
Prefixm@
Base TypeElementTag
ImplementsFlaggableObject, PropertyHolderObject
Identity FormatThe identity format for materials is the material type name.
For example, 'm@stick'.
DescriptionA MaterialTag represents a material (a type of block or item).

Block materials may sometimes also contain property data,
for specific values on the block material such as the growth stage of a plant or the orientation of a stair block.

Material types: 🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html.

This object type is flaggable.
Flags on this object type will be stored in the server saves file, under special sub-key "__materials"
MatchableMaterialTag matchers, sometimes identified as "<material>", associated with "<block>":
"material" plaintext: always matches.
"block" plaintext: matches if the material is a block-type material.
"item" plaintext: matches if the material is an item-type material.
"material_flagged:<flag>": a Flag Matchable for MaterialTag flags.
"vanilla_tagged:<tag_name>": matches if the given vanilla tag applies to the material. Allows advanced matchers, for example: "vanilla_tagged:mineable*".
If none of the above are used, uses an advanced matcher for the material name, like "stick".
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/MaterialTag.java#L37
NameTradeTag
Prefixtrade@
Base TypeElementTag
ImplementsPropertyHolderObject
Identity FormatThe identity format for trades is just the text 'trade'. All other data is specified through properties.
DescriptionMerchant trades are the parts of a special merchant inventory that is typically viewed by right clicking
a villager entity. Any number of trades can fit in a single merchant inventory.

Trades are represented by TradeTags.

The properties that can be used to customize a merchant trade are:

result=<item>
inputs=<item>(|<item>)
uses=<number of uses>
max_uses=<maximum number of uses>
has_xp=true/false

For example, the following command opens a virtual merchant inventory with two merchant trades.
The first trade offers a sponge for two emeralds, can be used up to 10 times,
and offers XP upon a successful transaction.
The second trade has zero maximum uses and displays a barrier in the input and output slots.

- opentrades trade[max_uses=10;inputs=emerald[quantity=2];result=sponge]|trade[inputs=barrier;result=barrier]
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/TradeTag.java#L17

Tag


Name<&hover[<hover_text>].type[<type>]>
ReturnsElementTag
DescriptionReturns a special chat code that makes the following text display the input hover text when the mouse is left over it.
This tag must be followed by an <&end_hover> tag.
Available hover types: SHOW_TEXT, SHOW_ITEM, or SHOW_ENTITY.
For example: - narrate "There is a <&hover[you found it!].type[SHOW_TEXT]>secret<&end_hover> in this message!"
Note: for "SHOW_ITEM", replace the text with a valid ItemTag. For "SHOW_ENTITY", replace the text with a valid spawned EntityTag (requires F3+H to see entities).
Note that this is a magic Denizen tool - refer to Language:Denizen Text Formatting.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/TextTagBase.java#L46
Name<&optimize>
ReturnsElementTag
DescriptionReturns a chat code that tells the formatted text parser to try to produce mininalist JSON text.
This is useful in particular for very long text or where text is being sent rapidly/repeatedly.
It is not needed in most normal messages.
It will produce incompatibility issues if used in items or other locations where raw JSON matching is required.
Note that this is a magic Denizen tool - refer to Language:Denizen Text Formatting.
Generated Example
- narrate <&optimize>
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/TextTagBase.java#L339
Name<AreaObject.living_entities>
ReturnsListTag(EntityTag)
DescriptionGets a list of all living entities currently within the area.
This includes Players, mobs, NPCs, etc., but excludes dropped items, experience orbs, etc.
Example
# Narrates the name of all the living entities within the area.
- foreach <cuboid[my_cuboid].living_entities> as:entity:
     - narrate <[entity].name>
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/AreaContainmentObject.java#L196
Name<ChunkTag.living_entities>
ReturnsListTag(EntityTag)
DescriptionReturns a list of living entities in the chunk.
This includes Players, mobs, NPCs, etc., but excludes dropped items, experience orbs, etc.
Example
# Loops though the living entities found in the player's chunk and narrates the name and location of it.
- foreach <player.location.chunk.living_entities> as:entity:
    - narrate "Found a <[entity].name> at <[entity].location.simple>!"
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/ChunkTag.java#L554
Name<crackshot.weapon[<weapon_name>]>
ReturnsItemTag
DescriptionReturns the ItemTag for the CrackShot weapon title specified, if it exists. 🔗https://github.com/Shampaggon/CrackShot/wiki/The-Complete-Guide-to-CrackShot#title
RequiresDepenizen, CrackShot
Sourcehttps://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/bridges/CrackShotBridge.java#L51
Name<ElementTag.lines_to_colored_list>
ReturnsListTag
DescriptionReturns a list of lines in the element, with colors spread over the lines manually.
Useful for things like item lore.
Generated Example
- foreach <element[hello_world].lines_to_colored_list> as:entry:
    - narrate "found <[entry]>"
Groupelement manipulation
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/bukkit/BukkitElementExtensions.java#L300
Name<ElementTag.on_hover[<message>].type[<type>]>
ReturnsElementTag
DescriptionAdds a hover message to the element, which makes the element display the input hover text when the mouse is left over it.
Available hover types: SHOW_TEXT, SHOW_ITEM, or SHOW_ENTITY.
Note: for "SHOW_ITEM", replace the text with a valid ItemTag. For "SHOW_ENTITY", replace the text with a valid spawned EntityTag (requires F3+H to see entities).
Note that this is a magic Denizen tool - refer to Language:Denizen Text Formatting.
For show_text, prefer Tag:ElementTag.on_hover
For show_item, prefer Tag:ElementTag.hover_item
Grouptext manipulation
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/bukkit/BukkitElementExtensions.java#L475
Name<ElementTag.optimize_json>
ReturnsElementTag
DescriptionTells the formatted text parser to try to produce mininalist JSON text.
This is useful in particular for very long text or where text is being sent rapidly/repeatedly.
It is not needed in most normal messages.
It will produce incompatibility issues if used in items or other locations where raw JSON matching is required.
Note that this is a magic Denizen tool - refer to Language:Denizen Text Formatting.
Generated Example
- narrate <element[hello_world].optimize_json>
Groupconversion
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/bukkit/BukkitElementExtensions.java#L431
Name<ElementTag.split[((regex:)<string>)].limit[<#>]>
ReturnsListTag
DescriptionReturns a list of portions of this element, split by the specified string,
and capped at the specified number of max list items.
If a split string is unspecified, splits by space.
Groupelement manipulation
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ElementTag.java#L1584
Name<EntityTag.custom_name>
ReturnsElementTag
MechanismEntityTag.custom_name
DescriptionReturns the entity's custom name (as set by plugin or name tag item), if any.
Generated Example
- narrate <player.custom_name>
Groupattributes
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityCustomName.java#L44
Name<EntityTag.display>
ReturnsElementTag
MechanismEntityTag.display
Description(Property) For an item display entity this is the model transform it will display, can be any of 🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/ItemDisplay.ItemDisplayTransform.html.
For a text display entity this is its text alignment, can be any of 🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/TextDisplay.html.
Generated Example
- narrate <player.display>
Synonyms (Search Aid)entitytag.display_transform, entitytag.text_alignment
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityDisplay.java#L11
Name<EntityTag.drinking_potion>
ReturnsItemTag
MechanismEntityTag.drinking_potion
DescriptionReturns the potion item a witch is drinking, or air if none.
Generated Example
- give <player.drinking_potion>
Groupproperties
RequiresPaper
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/properties/EntityDrinkingPotion.java#L41
Name<EntityTag.equipment_drop_chance>
ReturnsMapTag
MechanismEntityTag.equipment_drop_chance
Description(Property) Returns the chance of each piece of equipment dropping when the entity dies.
A drop chance of 0 will prevent the item from dropping, a drop chance of 1 will always drop the item if killed by a player, and a drop chance of higher than 1 will always drop the item no matter what the entity was killed by.
A map of equipment slots to drop chances, with keys "head", "chest", "legs", "feet", "hand", and "off_hand".
Example
# Use to narrate the drop chances of a zombie's equipment:
- narrate <[zombie].equipment_drop_chance>
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityEquipmentDropChance.java#L12
Name<EntityTag.equipment_map>
ReturnsMapTag
MechanismEntityTag.equipment
DescriptionReturns a MapTag containing the entity's equipment.
Output keys are boots, leggings, chestplate, helmet, and body.
Air items will be left out of the map.
Generated Example
- foreach <player.equipment_map> key:key as:val:
    - narrate "<[key]> is set as <[val]>"
Groupinventory
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityEquipment.java#L71
Name<EntityTag.fixed>
ReturnsElementTag(Boolean)
MechanismEntityTag.fixed
DescriptionReturns whether the item frame is fixed. (Meaning, it can't be altered by players or broken by block obstructions).
Generated Example
- if <player.fixed>:
    - narrate "it was true!"
- else:
    - narrate "it was false!"
Groupattributes
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityFixed.java#L57
Name<EntityTag.pickup_delay>
ReturnsDurationTag
MechanismEntityTag.pickup_delay
DescriptionReturns how long before the item-type entity can be picked up by a player.
Generated Example
- ratelimit <player> <player.pickup_delay>
Groupattributes
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EntityTag.java#L2252
Name<EntityTag.potion_type>
ReturnsElementTag
MechanismEntityTag.potion_type
Description(Property) Returns an Arrow or Area Effect Cloud's base potion type, if any.
See 🔗https://minecraft.wiki/w/Potion#Item_data for a list of potion types.
See Property:EntityTag.potion_effects to control the potion effects applied.
Generated Example
- narrate <player.potion_type>
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityPotionType.java#L13
Name<EntityTag.potion>
ReturnsItemTag
MechanismEntityTag.potion
Description(Property) Deprecated in favor of Property:EntityTag.potion_type for arrows, and Property:EntityTag.item for splash potions.
Generated Example
- give <player.potion>
GroupProperties
Deprecateduse 'EntityTag.potion_type' for arrows, and 'EntityTag.item' for splash potions.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityPotion.java#L19
Name<EntityTag.saddle>
ReturnsItemTag
DescriptionIf the entity is a horse or pig, returns the saddle as a ItemTag, or air if none.
Generated Example
- give <player.saddle>
Groupinventory
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EntityTag.java#L1429
Name<EntityTag.trace_framed_map>
ReturnsMapTag
DescriptionReturns information at the framed item of a filled map that an entity is currently looking at, if any.
The map contains key "x" and "y" as coordinates in the range of 0 to 128. These will automatically correct for rotation, if the framed item is rotated.
The map contains "entity" as the EntityTag of the item frame.
The map also contains "map" as the ID of the targeted map.
Returns null if the entity is not looking at an item_frame holding a filled_map.
Generated Example
- foreach <player.trace_framed_map> key:key as:val:
    - narrate "<[key]> is set as <[val]>"
Grouplocation
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EntityTag.java#L1511
Name<EntityTag.visible>
ReturnsElementTag(Boolean)
MechanismEntityTag.visible
DescriptionReturns whether the entity is visible.
Supports armor stands, item frames, and living entities.
Generated Example
- if <player.visible>:
    - narrate "it was true!"
- else:
    - narrate "it was false!"
Groupattributes
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityVisible.java#L60
Name<EntityTag.weapon_damage[(<entity>)]>
ReturnsElementTag(Number)
DescriptionReturns the amount of damage the entity will do based on its held item.
Optionally, specify a target entity to test how much damage will be done to that specific target (modified based on enchantments and that entity's armor/status/etc).
Note that the result will not always be completely exact, as it doesn't take into account some specific factors (eg sweeping vs single-hit, etc).
Generated Example
- narrate "the number value is <player.weapon_damage>"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EntityTag.java#L2514
Name<InventoryTag.contains.display[(strict:)<element>].quantity[<#>]>
ReturnsElementTag(Boolean)
DescriptionReturns whether the inventory contains a certain quantity of an item with the specified display name.
Use 'strict:' in front of the search element to ensure the display name is EXACTLY the search element,
otherwise the searching will only check if the search element is contained in the display name.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L1516
Name<InventoryTag.contains.display[(strict:)<element>]>
ReturnsElementTag(Boolean)
DescriptionReturns whether the inventory contains an item with the specified display name.
Use 'strict:' in front of the search element to ensure the display name is EXACTLY the search element,
otherwise the searching will only check if the search element is contained in the display name.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L1493
Name<InventoryTag.contains.lore[(strict:)<element>|...].quantity[<#>]>
ReturnsElementTag(Boolean)
DescriptionReturns whether the inventory contains a certain quantity of an item with the specified lore.
Use 'strict:' in front of the search elements to ensure all lore lines are EXACTLY the search elements,
otherwise the searching will only check if the search elements are contained in the lore.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L1599
Name<InventoryTag.contains.lore[(strict:)<element>|...]>
ReturnsElementTag(Boolean)
DescriptionReturns whether the inventory contains an item with the specified lore.
Use 'strict:' in front of the search elements to ensure all lore lines are EXACTLY the search elements,
otherwise the searching will only check if the search elements are contained in the lore.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L1575
Name<InventoryTag.craftable_quantity>
ReturnsElementTag(Number)
DescriptionReturns the quantity of items that would be received if this crafting inventory were fully crafted (eg via a shift click).
Generated Example
- narrate "the number value is <player.inventory.craftable_quantity>"
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L2230
Name<InventoryTag.equipment_map>
ReturnsMapTag
DescriptionReturns a MapTag containing the inventory's equipment.
Output keys for players are boots, leggings, chestplate, helmet.
Output keys for horses are saddle, armor.
Air items will be left out of the map.
Generated Example
- foreach <player.inventory.equipment_map> key:key as:val:
    - narrate "<[key]> is set as <[val]>"
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L2158
Name<InventoryTag.equipment>
ReturnsListTag(ItemTag)
DescriptionReturns the equipment of an inventory as a list of items.
For players, the order is boots|leggings|chestplate|helmet.
For horses, the order is saddle|armor.
Generated Example
- foreach <player.inventory.equipment> as:entry:
    - narrate "found <[entry]>"
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L2171
Name<InventoryTag.fuel>
ReturnsItemTag
MechanismInventoryTag.fuel
DescriptionReturns the item currently in the fuel section of a furnace or brewing stand inventory.
Generated Example
- give <player.inventory.fuel>
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L2315
Name<InventoryTag.input>
ReturnsItemTag
MechanismInventoryTag.input
DescriptionReturns the item currently in the smelting slot of a furnace inventory, or the ingredient slot of a brewing stand inventory.
Generated Example
- give <player.inventory.input>
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L2332
Name<InventoryTag.list_contents.simple>
ReturnsListTag(ItemTag)
MechanismInventoryTag.contents
DescriptionReturns a list of all items in the inventory, without item properties.
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/inventory/InventoryContents.java#L134
Name<InventoryTag.list_contents.with_lore[<element>].simple>
ReturnsListTag(ItemTag)
MechanismInventoryTag.contents
DescriptionReturns a list of all items in the inventory with the specified
lore, without item properties. Color codes are ignored.
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/inventory/InventoryContents.java#L165
Name<InventoryTag.list_contents.with_lore[<element>]>
ReturnsListTag(ItemTag)
MechanismInventoryTag.contents
DescriptionReturns a list of all items in the inventory with the specified
lore. Color codes are ignored.
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/inventory/InventoryContents.java#L147
Name<InventoryTag.list_contents>
ReturnsListTag(ItemTag)
MechanismInventoryTag.contents
DescriptionReturns a list of all items in the inventory.
Generated Example
- foreach <player.inventory.list_contents> as:entry:
    - narrate "found <[entry]>"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/inventory/InventoryContents.java#L124
Name<InventoryTag.map_slots>
ReturnsMapTag
DescriptionReturns a map of inventory slots to the items in those slots (excludes air).
Generated Example
- foreach <player.inventory.map_slots> key:key as:val:
    - narrate "<[key]> is set as <[val]>"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/inventory/InventoryContents.java#L105
Name<InventoryTag.matrix>
ReturnsListTag(ItemTag)
MechanismInventoryTag.matrix
DescriptionReturns the items currently in a crafting inventory's matrix.
Generated Example
- foreach <player.inventory.matrix> as:entry:
    - narrate "found <[entry]>"
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L2183
Name<InventoryTag.result>
ReturnsItemTag
MechanismInventoryTag.result
DescriptionReturns the item currently in the result section of a crafting inventory or furnace inventory.
Generated Example
- give <player.inventory.result>
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L2250
Name<InventoryTag.slot[<#>|...]>
ReturnsObjectTag
DescriptionIf just a single slot is specified, returns the ItemTag in the specified slot.
If a list is specified, returns a ListTag(ItemTag) of the item in each given slot.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L2096
Name<ListTag.closest_to[<text>]>
ReturnsElementTag
DescriptionReturns the raw text of the item in the list that seems closest to the given value.
Particularly useful for command handlers, "<list[c1|c2|c3|...].closest_to[<argument>]>" to get the best option as "did you mean" suggestion.
Be warned that this will always return /something/, excluding the case of an empty list, which will return an empty element.
Uses the logic of tag "ElementTag.difference"!
You can use that tag to add an upper limit on how different the text can be.
Example
# Narrates "spawn"
- narrate "<list[dance|quit|spawn].closest_to[spwn]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2734
Name<ListTag.deduplicate>
ReturnsListTag
DescriptionReturns a copy of the list with any duplicate items removed.
Example
# Narrates a list of "one|two|three"
- narrate <list[one|one|two|three].deduplicate>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1513
Name<ListTag.exclude_single[<value>]>
ReturnsListTag
DescriptionReturns a new ListTag excluding the items specified.
If your list contains sub-lists, this tag can cleanly remove them.
Note that the "_single" refers to not taking a list of removables, it does still remove more than once instance of the value if present in the list.
Example
# Narrates a list of "one|two|three|four", note how it does not remove anything here, as "two|three" does not appear as a *single* value in the list.
- narrate <list[one|two|three|four].exclude_single[two|three]>
Example
# Narrates a list of "three|four", with the single-entry "one|two" value removed.
- narrate <list_single[one|two].include[three|four].exclude_single[one|two]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1286
Name<ListTag.exclude[...|...].max[<#>]>
ReturnsListTag
DescriptionReturns a new ListTag excluding the items specified. Specify a maximum number of items to remove from the list.
Max must be an integer >= 1.
Example
# Narrates a list of "taco|taco|taco|potato"
- narrate <list[taco|potato|taco|potato|taco|potato].exclude[potato].max[2]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1326
Name<ListTag.exclude[...|...]>
ReturnsListTag
DescriptionReturns a new ListTag excluding the items specified.
Example
# Narrates a list of "one|three"
- narrate <list[one|two|three|four|two].exclude[two|four]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1311
Name<ListTag.find_all_matches[<matcher>]>
ReturnsListTag
DescriptionReturns all the numbered indices of elements that match within a list,
using the system behind Language:Advanced Object Matching,
or an empty list if the list does not contain that item.
Example
# Narrates a list of "2|3"
- narrate <list[one|two|three].find_all_matches[t*]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1631
Name<ListTag.find_all_partial[<element>]>
ReturnsListTag
DescriptionReturns all the numbered locations of elements that contain the text within a list,
or an empty list if the list does not contain that item.
Example
# Narrates a list of "2|4"
- narrate <list[one|two|three|two].find_all_partial[tw]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1610
Name<ListTag.find_all[<element>]>
ReturnsListTag
DescriptionReturns all the numbered indices of all entries that match the text within a list,
or an empty list if the list does not contain that item.
Example
# Narrates a list of "2|4"
- narrate <list[one|two|three|two].find_all[two]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1654
Name<ListTag.find_match[<matcher>]>
ReturnsElementTag(Number)
DescriptionReturns the numbered index of the first match within a list,
using the system behind Language:Advanced Object Matching,
or -1 if the list does not contain that item.
Example
# Narrates "2"
- narrate <list[one|two|three].find_match[t*]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1695
Name<ListTag.find_partial[<element>]>
ReturnsElementTag(Number)
DescriptionReturns the numbered index of the first partially matching entry within a list,
or -1 if the list does not contain that item.
Example
# Narrates "2"
- narrate <list[one|two|three].find_partial[tw]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1675
Name<ListTag.find[<element>]>
ReturnsElementTag(Number)
DescriptionReturns the numbered index of an entry within a list,
or -1 if the list does not contain that item.
Example
# Narrates "2"
- narrate <list[one|two|three].find[two]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1716
Name<ListTag.include[...|...]>
ReturnsListTag
DescriptionReturns a new ListTag including the items specified.
Example
# Narrates a list of "one|two|three|four"
- narrate <list[one|two].include[three|four]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1271
Name<ListTag.insert_single[...|...].at[<#>]>
ReturnsListTag
DescriptionReturns a new ListTag with the single item specified inserted to the specified location.
Note the index input options described at ObjectType:listtag
Example
# Narrates a list with 3 values: "one", "two|alsotwo", "three"
- narrate <list[one|three].insert_single[two|alsotwo].at[2]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1109
Name<ListTag.insert[...|...].at[<#>]>
ReturnsListTag
DescriptionReturns a new ListTag with the items specified inserted to the specified location.
Note the index input options described at ObjectType:listtag
Example
# Narrates a list of "one|two|three|four"
- narrate <list[one|four].insert[two|three].at[2]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1076
Name<ListTag.random[(<#>)]>
ReturnsObjectTag
DescriptionGets a random item in the list and returns it.
Optionally, add [<#>] to instead get a list of multiple randomly chosen list entries.
Example
# Narrates EITHER "one" OR "two" - different each time!
- narrate "<list[one|two].random>
Example
# Could narrate "one|two", "two|three", OR "one|three" - different each time!
- narrate "<list[one|two|three].random[2]>
Example
# Could narrate "one|two|three", "one|three|two", "two|one|three", "two|three|one", "three|two|one", OR "three|one|two" - different each time!
- narrate "<list[one|two|three].random[9999]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2692
Name<ListTag.remove[<#>].to[<#>]>
ReturnsListTag
DescriptionReturns a new ListTag excluding the items in the specified index range.
Note the index input options described at ObjectType:listtag
Example
# Narrates a list of "one|five"
- narrate <list[one|two|three|four|five].remove[2].to[4]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1369
Name<ListTag.remove[<#>|...]>
ReturnsListTag
DescriptionReturns a new ListTag excluding the items at the specified index.
Note the index input options described at ObjectType:listtag
Example
# Narrates a list of "one|three|four"
- narrate <list[one|two|three|four].remove[2]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1356
Name<ListTag.reverse>
ReturnsListTag
DescriptionReturns a copy of the list, with all items placed in opposite order.
Example
# Narrates a list of "three|two|one"
- narrate <list[one|two|three].reverse>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1498
Name<ListTag.separated_by[<text>]>
ReturnsElementTag
DescriptionReturns the list formatted, with each item separated by the defined text.
Example
# Narrates "bob and joe and john"
- narrate "<list[bob|joe|john].separated_by[ and ]>"
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L798
Name<ListTag.set_single[<value>].at[<#>]>
ReturnsListTag
DescriptionReturns a new ListTag with the single item specified inserted to the specified location, replacing the object already at that location.
Note the index input options described at ObjectType:listtag
Example
# Narrates a list with 3 values: "one", "potato|taco", "three"
- narrate <list[one|two|three].set_single[potato|taco].at[2]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1179
Name<ListTag.set[...|...].at[<#>]>
ReturnsListTag
DescriptionReturns a new ListTag with the items specified inserted to the specified location, replacing the object already at that location.
Note the index input options described at ObjectType:listtag
Example
# Narrates a list of "one|potato|three"
- narrate <list[one|two|three].set[potato].at[2]>
Example
# Narrates a list of "one|potato|taco|hotdog|three"
- narrate <list[one|two|three].set[potato|taco|hotdog].at[2]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1140
Name<ListTag.shared_contents[...|...]>
ReturnsListTag
DescriptionReturns a list of only items that appear in both this list and the input one.
This will also inherently deduplicate the output as part of processing.
This will retain the list order of the list object the tag is on (so, for example "a|b|c" .shared_contents[c|b] returns "b|c").
Example
# Narrates a list of "two|four"
- narrate <list[one|two|three|four].shared_contents[two|four|five|six]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1413
Name<ListTag.sort_by_number[<tag>]>
ReturnsListTag
DescriptionReturns a copy of the list, sorted such that the lower numbers appear first, and the higher numbers appear last.
Rather than sorting based on the item itself, it sorts based on a tag attribute read from within the object being read.
For example, you might sort a list of players based on the amount of money they have, via .sort_by_number[money] on the list of valid players.
Non-numerical input is considered an error, and the result is not guaranteed.
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2196
Name<ListTag.sort_by_value[<tag>]>
ReturnsListTag
DescriptionReturns a copy of the list, sorted alphanumerically.
Rather than sorting based on the item itself, it sorts based on a tag attribute read from within the object being read.
For example, you might sort a list of players based on their names, via .sort_by_value[name] on the list of valid players.
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2159
Name<ListTag.sort[<procedure>]>
ReturnsListTag
DescriptionReturns a list sorted according to the return values of a procedure.
The <procedure> should link a procedure script that takes two definitions each of which will be an item
in the list, and returns -1, 0, or 1 based on whether the second item should be added. EG, if a procedure
with definitions "one" and "two" returned -1, it would place "two" after "one". Note that this
uses some complex internal sorting code that could potentially throw errors if the procedure does not return
consistently - EG, if "one" and "two" returned 1, but "two" and "one" returned 1 as well - obviously,
"two" can not be both before AND after "one"!
Note that the script should ALWAYS return -1, 0, or 1, or glitches could happen!
Note that if two inputs are exactly equal, the procedure should always return 0.
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2250
Name<LocationTag.find.living_entities.within[<#.#>]>
ReturnsListTag(EntityTag)
DescriptionReturns a list of living entities within a radius.
This includes Players, mobs, NPCs, etc., but excludes dropped items, experience orbs, etc.
Result list is sorted by closeness (1 = closest, 2 = next closest, ... last = farthest).
Groupfinding
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L3052
Name<LocationTag.furnace_cook_duration>
ReturnsDurationTag
MechanismLocationTag.furnace_cook_duration
DescriptionReturns the cook time a furnace has been cooking its current item for.
Generated Example
- ratelimit <player> <player.location.furnace_cook_duration>
Groupworld
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L3845
Name<LocationTag.jukebox_record>
ReturnsItemTag
MechanismLocationTag.jukebox_record
DescriptionReturns the record item currently inside the jukebox.
If there's no record, will return air.
Generated Example
- give <player.location.jukebox_record>
Groupworld
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L4004
Name<LocationTag.skull_skin.full>
ReturnsElementTag
MechanismLocationTag.skull_skin
DescriptionReturns the skin the skull item is displaying - just the name or UUID as text, not a player object,
along with the permanently cached texture property.
In format "uuid|texture" - separated by a pipe, but not a ListTag.
Groupworld
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L1564
Name<MaterialTag.food_points>
ReturnsElementTag(Number)
DescriptionIf the material is an item, returns the amount of hunger it restores when eaten.
See 🔗https://minecraft.wiki/w/Food for more information on food mechanics.
Generated Example
- narrate "the number value is <material[stone].food_points>"
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/MaterialTag.java#L664
Name<MaterialTag.is_enabled[<world>]>
ReturnsElementTag(Boolean)
DescriptionReturns whether the material is enabled in the specified world.
If experimental features are disabled in the given world, and the MaterialTag is an item or block that is only enabled by experimental features, this will return false.
Generated Example
- if <material[stone].is_enabled[space]>:
    - narrate "it was true!"
- else:
    - narrate "it was false!"
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/MaterialTag.java#L679
Name<NPCTag.sentinel.drop_chances>
ReturnsListTag
DescriptionReturns a list of drop chances for items that this Sentinel NPC will drop on death.
RequiresDepenizen, Sentinel
Sourcehttps://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/properties/sentinel/SentinelNPCProperties.java#L402
Name<NPCTag.sentinel.drops>
ReturnsListTag(ItemTag)
DescriptionReturns a list of items that this Sentinel NPC will drop on death.
RequiresDepenizen, Sentinel
Sourcehttps://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/properties/sentinel/SentinelNPCProperties.java#L387
Name<NPCTag.skull_skin>
ReturnsElementTag
DescriptionReturns the NPC's current skin blob, formatted for input to a Player Skull item.
In the format: "UUID|Texture" (two values separated by pipes).
See also Language:Player Entity Skins (Skin Blobs).
Generated Example
- narrate <npc.skull_skin>
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/NPCTag.java#L873
Name<ObjectTag.is_truthy>
ReturnsElementTag(Boolean)
DescriptionReturns true if the object is 'truthy'. An object is 'truthy' if it exists and is valid, and does not represent a concept like emptiness.
An empty list or an air item will return 'false'. Plaintext "null" or "false", an empty element, or a numeric zero will return 'false' as well.
Some object types may have their own logical implementations, for examples an EntityTag value is 'truthy' only if the entity it represents is spawned.
Errored/broken/invalid tags are also considered 'false' by this logic.
This functions as a fallback - meaning, if the tag up to this point errors, that error will be hidden.
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/tags/CoreObjectTags.java#L127
Name<PlayerTag.skillapi.skill_indicator[<skill>]>
ReturnsItemTag
DescriptionReturns the indicator item for the skill.
RequiresDepenizen, SkillAPI
Sourcehttps://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/properties/skillapi/SkillAPIPlayerProperties.java#L249
Name<PlayerTag.skull_skin>
ReturnsElementTag
DescriptionReturns the player's current skin blob, formatted for input to a Player Skull item.
In the format: "UUID|Texture|Name" (three values separated by pipes).
See also Language:Player Entity Skins (Skin Blobs).
Generated Example
- narrate <player.skull_skin>
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L1716
Name<server.generate_loot_table[id=<id>;location=<location>;(killer=<entity>);(entity=<entity>);(loot_bonus=<#>/{-1});(luck=<#.#>/{0})]>
ReturnsListTag(ItemTag)
DescriptionReturns a list of items from a loot table, given a map of input data.
Required input: id: the loot table ID, location: the location where it's being generated (LocationTag).
Optional inputs: killer: an online player (or player-type NPC) that is looting, entity: a dead entity being looted from (a valid EntityTag instance that is or was spawned in the world),
loot_bonus: the loot bonus level (defaults to -1) as an integer number, luck: the luck potion level (defaults to 0) as a decimal number.

Some inputs will be strictly required for some loot tables, and ignored for others.

A list of valid loot tables can be found here: 🔗https://minecraft.wiki/w/Loot_table#List_of_loot_tables
Note that the tree view represented on the wiki should be split by slashes for the input - for example, "cow" is under "entities" in the tree so "entities/cow" is how you input that.
CAUTION: Invalid loot table IDs will generate an empty list rather than an error.
Example
- give <server.generate_loot_table[id=chests/spawn_bonus_chest;killer=<player>;location=<player.location>]>
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L1796
Name<server.pattern_types>
ReturnsListTag
DescriptionReturns a list of all banner patterns known to the server.
Generally used with Tag:ItemTag.patterns.
For the default ("vanilla") pattern types, see the "Resource name" column in 🔗https://minecraft.wiki/w/Banner/Patterns.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L871
Name<server.potion_types>
ReturnsListTag
DescriptionReturns a list of all potion types known to the server, including their "strong" and extended variants.
For the default ("vanilla") potion types, see the table in 🔗https://minecraft.wiki/w/Potion#Item_data.
Refer also to Tag:server.potion_effect_types.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L905
Name<server.recipe_result[<id>]>
ReturnsItemTag
DescriptionReturns the item that a recipe will create when crafted.
Brewing recipes are only supported on Paper, and only custom ones are available.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L335
Name<server.vanilla_material_tags>
ReturnsListTag
DescriptionReturns a list of vanilla tags applicable to blocks, fluids, or items. See also 🔗https://minecraft.wiki/w/Tag.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L1726
Name<SkillAPIClassTag.icon>
ReturnsItemTag
DescriptionReturns the item icon representing this SkillAPI class in menus.
RequiresDepenizen, SkillAPI
Sourcehttps://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/objects/skillapi/SkillAPIClassTag.java#L189
Name<TradeTag.inputs>
ReturnsListTag(ItemTag)
MechanismTradeTag.inputs
Description(Property) Returns the items required to make a successful trade. Use an empty input to make the trade impossible.
NOTE: If more than two items are specified, then only the first two items will be used.
Generated Example
- foreach <trade[trade[result=diamond;max_uses=10;inputs=stick]].inputs> as:entry:
    - narrate "found <[entry]>"
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/trade/TradeInputs.java#L14
Name<WorldTag.living_entities>
ReturnsListTag(EntityTag)
DescriptionReturns a list of living entities in this world.
This includes Players, mobs, NPCs, etc., but excludes dropped items, experience orbs, etc.
Generated Example
- foreach <player.location.world.living_entities> as:entry:
    - narrate "found <[entry]>"
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/WorldTag.java#L273

Just Barely Matched Results



Command


NameAdvancement
Syntaxadvancement [id:<name>] (delete/grant:<players>/revoke:<players>/{create}) (parent:<name>) (icon:<item>) (title:<text>) (description:<text>) (background:<key>) (frame:<type>) (toast:<boolean>) (announce:<boolean>) (hidden:<boolean>) (x:<offset>) (y:<offset>) (progress_length:<#>)
Short DescriptionControls a custom advancement.
Full DescriptionControls custom Minecraft player advancements. You should generally create advancements manually on server start.
Currently, the ID argument may only refer to advancements added through this command.
The default action is to create and register a new advancement.
You may also delete an existing advancement, in which case do not provide any further arguments.
You may grant or revoke an advancement for a list of players, in which case do not provide any further arguments.
The parent argument sets the root advancement in the advancements menu, in the format "namespace:key".
If no namespace is specified, the parent is assumed to have been created through this command.
The icon argument sets the icon displayed in toasts and the advancements menu.
As of MC 1.20, an icon is required. Dirt will be used if it is missing.
The title argument sets the title that will show on toasts and in the advancements menu.
The description argument sets the information that will show when scrolling over a chat announcement or in the advancements menu.
The background argument sets the image to use if the advancement goes to a new tab.
If the background is unspecified, defaults to "minecraft:gui/advancements/backgrounds/stone".
The frame argument sets the type of advancement - valid arguments are CHALLENGE, GOAL, and TASK.
The toast argument sets whether the advancement should display a toast message when a player completes it. Default is true.
The announce argument sets whether the advancement should display a chat message to the server when a player completes it. Default is true.
The hidden argument sets whether the advancement should be hidden until it is completed.
The x and y arguments are offsets based on the size of an advancement icon in the menu. They are required for custom tabs to look reasonable.

When creating an advancement, optionally specify 'progress_length' to make it require multiple parts.
When granting an advancement, optionally specify 'progress_length' to only grant partial progress.

To award a pre-existing vanilla advancement, instead use Mechanism:PlayerTag.award_advancement

WARNING: Failure to re-create advancements on every server start may result in loss of data - use Event:server prestart.

If you mess with datapacks, you will also need to re-create advancements during Event:server resources reloaded
Related Tags<PlayerTag.has_advancement[<advancement>]> Returns whether the player has completed the specified advancement.
<PlayerTag.advancements> Returns a list of the names of all advancements the player has completed.
<server.advancement_types> Returns a list of all registered advancement names. (...)
Usage Example
# Creates a new advancement that has a potato icon.
- advancement id:hello_world icon:baked_potato "title:Hello World" "description:You said hello to the world."
Usage Example
# Creates a new advancement with the parent "hello_world" and a CHALLENGE frame. Hidden until it is completed.
- advancement id:hello_universe parent:hello_world icon:ender_pearl "title:Hello Universe" "description:You said hello to the UNIVERSE." frame:challenge hidden:true x:1
Usage Example
# Grants the "hello_world" advancement to the current player.
- advancement id:hello_world grant:<player>
Groupplayer
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/player/AdvancementCommand.java#L36
NameCustomEvent
Syntaxcustomevent [id:<id>] (context:<map>)
Short DescriptionFires a custom world script event.
Full DescriptionFires a custom world script event.

Input is an ID (the name of your custom event, choose a constant name to use), and an optional MapTag of context data.

Linked data (player, npc, ...) is automatically sent across to the event.

Use with Event:custom event
Related Tags<entry[saveName].any_ran> returns a boolean indicating whether any events ran as a result of this command.
<entry[saveName].was_cancelled> returns a boolean indicating whether the event was cancelled.
<entry[saveName].determination_list> returns a ListTag of determinations to this event. Will be an empty list if 'determine output:' is never used.
Usage Example
# Use to call a custom event with path "on custom event id:things_happened:"
- customevent id:things_happened
Usage Example
# Use to call a custom event with path "on custom event id:things_happened:" and supply a context map of basic data.
- customevent id:things_happened context:[a=1;b=2;c=3]
Usage Example
# Use to call a custom event with a path such as "on custom event id:things_happened data:item:stone:" and supply a context map of more interesting data.
- definemap context:
    waffle: hello world
    item: <player.item_in_hand>
- customevent id:things_happened context:<[context]>
Usage Example
# Use to call a custom event and allow cancelling or replacing a value.
- definemap context:
    message: hello world
- customevent id:custom_message context:<[context]> save:event
- if <entry[event].was_cancelled>:
    - stop
- define message <entry[event].determination_list.first.if_null[<[context.message]>]>
- narrate "Final message is: <[message]>"
Groupcore
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/core/CustomEventCommand.java#L23
NameEngage
Syntaxengage (<duration>) (player)
Short DescriptionTemporarily disables an NPCs toggled interact script-container triggers.
Full DescriptionEngaging an NPC will temporarily disable any interact script-container triggers.
To reverse this behavior, use either the disengage command, or specify a duration in which the engage should timeout.
Specifying an engage without a duration will render the NPC engaged until a disengage is used on the NPC.

Engaging an NPC by default affects all players attempting to interact with the NPC.
You can optionally specify 'player' to only affect the linked player.

While engaged, all triggers and actions associated with triggers will not 'fire',
except the 'on unavailable' assignment script-container action, which will fire for triggers that were enabled previous to the engage command.

Engage can be useful when NPCs are carrying out a task that shouldn't be interrupted, or to provide a good way to avoid accidental 'retrigger'.

See Command:Disengage
Related Tags<NPCTag.engaged> Returns whether the NPC is currently engaged. (...)
Usage Example
# Use to make an NPC appear 'busy'.
- engage
- chat 'Give me a few minutes while I mix you a potion!'
- walk <npc.anchor[mixing_station]>
- wait 10s
- walk <npc.anchor[service_station]>
- chat 'Here you go!'
- give potion <player>
- disengage
Usage Example
# Use to avoid 'retrigger'.
- engage 5s
- take quest_item
- flag player finished_quests:->:super_quest
Groupnpc
RequiresCitizens
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/npc/EngageCommand.java#L30
NameFakeInternalData
Syntaxfakeinternaldata [entity:<entity>] [data:<map>|...] (for:<player>|...) (speed:<duration>)
Short DescriptionSends fake entity data updates, optionally animating them with sub-tick precision.
Full DescriptionSends fake internal entity data updates, optionally sending multiple over time.
This supports sub-tick precision, allowing smooth/high FPS animations.

The input to 'data:' is a list of ObjectType:MapTags, with each map being a frame to send; see Language:Internal Entity Data for more information.

Optionally specify a list of players to fake the data for, defaults to the linked player.

'speed:' is the amount of time between each frame getting sent, supporting sub-tick delays.
Note that this is the delay between each frame, regardless of their content (see examples).
Related TagsNone
Usage Example
# Animates an item display entity's item for the linked player, and slowly scales it up.
- fakeinternaldata entity:<[item_display]> data:[item=iron_ingot;scale=0.6,0.6,0.6]|[item=gold_ingot;scale=0.8,0.8,0.8]|[item=netherite_ingot;scale=1,1,1] speed:0.5s
Usage Example
# Changes an item display's item, then its scale a second later, then its item again another second later.
- fakeinternaldata entity:<[item_display]> data:[item=stone]|[scale=2,2,2]|[item=waxed_weathered_cut_copper_slab] speed:1s
Usage Example
# Animates a rainbow glow on a display entity for all online players.
- define color <color[red]>
- repeat 256 from:0 as:hue:
  - define frames:->:[glow_color=<[color].with_hue[<[hue]>].argb_integer>]
- fakeinternaldata entity:<[display]> data:<[frames]> for:<server.online_players> speed:0.01s
Groupentity
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/FakeInternalDataCommand.java#L46
NameFirework
Syntaxfirework (<location>) (power:<#>) (<type>/random) (primary:<color>|...) (fade:<color>|...) (flicker) (trail) (life:<duration>)
Short DescriptionLaunches a firework with customizable style.
Full DescriptionThis command launches a firework from the specified location.

If no location is given, the linked NPC or player's location will be used by default.

The power option, which defaults to 1 if left empty, specifies the 'power' integer of the firework, which mainly controls how high the firework will go before exploding.
Alternately, the "life" option allows you to manually specify a specific duration.

The type option which specifies the shape the firework will explode with. If unspecified, 'ball' will be used.
Can be any of: ball, ball_large, star, burst, or creeper

The primary option specifies what color the firework explosion will start with, as a ColorTag. If unspecified, 'yellow' will be used.

The fade option specifies what color the firework explosion will fade into, as a ColorTag.

The trail option means the firework will leave a trail behind it.

The flicker option means the firework will explode with a flicker effect.
Related Tags<EntityTag.firework_item> If the entity is a firework, returns the firework item used to launch it.
<ItemTag.is_firework> Returns whether the item is a firework. (...)
<ItemTag.firework> Returns the firework's property value as a list, matching the non-MapTag format of the mechanism. (...)
<entry[saveName].launched_firework> returns a EntityTag of the firework that was launched.
Usage Example
# Use to launch a star firework which explodes yellow and fades to white afterwards at the player's location.
- firework <player.location> star primary:yellow fade:white
Usage Example
# Use to make the firework launch double the height before exploding.
- firework <player.location> power:2 star primary:yellow fade:white
Usage Example
# Use to launch a firework which leaves a trail.
- firework <player.location> random trail
Usage Example
# Use to launch a firework which leaves a trail and explodes with a flicker effect at related location.
- firework <context.location> random trail flicker
Groupworld
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/world/FireworkCommand.java#L38
NameFlag
Related Guide Pagehttps://guide.denizenscript.com/guides/basics/flags.html
Syntaxflag [<object>|...] [<name>([<#>])](:<action>)[:<value>] (expire:<time>)
Short DescriptionSets or modifies a flag on any flaggable object.
Full DescriptionThe flag command sets or modifies custom data values stored on any flaggable object (the server, a player/NPC/entity, a block location, ...).
See also Language:flag system.

This command supports data actions, see Language:data actions.

Flags by default are added permanently (or for the lifetime of the object they're attached to).
You can optionally specify a system time the flag will expire at, using either a DurationTag or a TimeTag.
If a DurationTag is used, it will be equivalent to: <util.time_now.add[<your_duration_here>]>
Related Tags<FlaggableObject.flag[<flag_name>]> Returns the specified flag from the flaggable object. (...)
<FlaggableObject.has_flag[<flag_name>]> Returns true if the flaggable object has the specified flag, otherwise returns false. (...)
<FlaggableObject.flag_expiration[<flag_name>]> Returns a TimeTag indicating when the specified flag will expire. (...)
<FlaggableObject.list_flags> Returns a list of the flaggable object's flags. (...)
<server.online_players_flagged[<flag_name>]> Returns a list of all online players with a specified flag set. (...)
<server.players_flagged[<flag_name>]> Returns a list of all players (online or offline) with a specified flag set. (...)
<server.spawned_npcs_flagged[<flag_name>]> Returns a list of all spawned NPCs with a specified flag set. (...)
<server.npcs_flagged[<flag_name>]> Returns a list of all NPCs with a specified flag set. (...)
Usage Example
# Use to create or set a flag on a player.
- flag <player> playstyle:aggressive
Usage Example
# Use to set a temporary flag for five minutes on a player.
- flag <player> just_did_something expire:5m
Usage Example
# Use to flag an npc with a given tag value.
- flag <npc> location:<npc.location>
Usage Example
# Use to apply mathematical changes to a flag's value on a unique object.
- flag <context.damager> damage_dealt:+:<context.damage>
Usage Example
# Use to add an item to a server flag as a new value without removing existing values.
- flag server cool_people:->:<[player]>
Usage Example
# Use to add multiple items as individual new values to a server flag that is already a list.
- flag server cool_people:|:<[player]>|<[someplayer]>
Usage Example
# Use to remove an entry from a server flag.
- flag server cool_people:<-:<[someplayer]>
Usage Example
# Use to completely remove a flag.
- flag server cool_people:!
Usage Example
# Use to modify a specific index in a list flag.
- flag server myflag[3]:HelloWorld
Groupcore
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/core/FlagCommand.java#L77
NameGamerule
Syntaxgamerule [<world>] [<rule>] [<value>]
Short DescriptionSets a gamerule on the world.
Full DescriptionSets a gamerule on the world. A list of valid gamerules can be found here: 🔗https://minecraft.wiki/w/Game_rule
Related Tags<WorldTag.gamerule[<gamerule>]> Returns the current value of the specified gamerule in the world.
Usage Example
# Use to disable fire spreading in world "Adventure".
- gamerule Adventure fire_spread_radius_around_player 0
Usage Example
# Use to avoid mobs from destroying blocks (creepers, endermen...) and picking items up (zombies, skeletons...) in world "Adventure".
- gamerule Adventure mob_griefing false
Groupworld
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/world/GameRuleCommand.java#L25
NameIf
Related Guide Pagehttps://guide.denizenscript.com/guides/basics/if-command.html
Syntaxif [<value>] (!)(<operator> <value>) (&&/|| ...) [<commands>]
Short DescriptionCompares values, and runs a subset of commands if they match.
Full DescriptionCompares values, and runs a subset of commands if they match.
Works with the else command, which handles alternatives for when the comparison fails.
The if command is equivalent to the English phrasing "if something is true, then do the following".

Values are compared using the comparable system. See Language:operator for information.

Comparisons may be chained together using the symbols '&&' and '||' or their text equivalents 'and' and 'or'.
'&&' means "and", '||' means "or".
So, for example "if <[a]> && <[b]>:" requires both a AND b to be true.
"if <[a]> and <[b]>:" also requires both a AND b to be true.

The "or" is inclusive, meaning "if <[a]> || <[b]>:" will pass for any of the following:
a = true, b = true
a = true, b = false
a = false, b = true
but will fail when a = false and b = false.

Sets of comparisons may be grouped using ( parens ) as separate arguments.
So, for example "if ( <[a]> && <[b]> ) || <[c]>", or "if ( <[x]> or <[y]> or <[z]> ) and ( <[a]> or <[b]> or <[c]> )"
Grouping is REQUIRED when using both '&&' and '||' in one line. Otherwise, groupings should not be used at all.

Boolean inputs and groups both support negating with the '!' symbol as a prefix.
This means you can do "if !<[a]>" to say "if a is NOT true".
Similarly, you can do "if !( <[a]> || <[b]> )", though be aware that per rules of boolean logic,
that example is the exactly same as "if !<[a]> && !<[b]>".

You can also use keyword "not" as its own argument to negate a boolean or an operator.
For example, "if not <[a]>:" will require a to be false, and "if <[a]> not equals <[b]>:" will require that 'a' does not equal 'b'.

When not using a specific comparison operator, true vs false will be determined by Truthiness, see Tag:ObjectTag.is_truthy for details.
For example, "- if <player||null>:" will pass if a player is linked, valid, and online.
Related Tags<ObjectTag.is[<operator>].to[<element>]> Takes an operator, and compares the first object to the given second object. (...)
<ObjectTag.is[<operator>].than[<element>]> Takes an operator, and compares the first object to the given second object. (...)
Usage Example
# Use to narrate a message only if a player has a flag.
- if <player.has_flag[secrets]>:
    - narrate "The secret number is 3!"
Usage Example
# Use to narrate a different message depending on a player's money level.
- if <player.money> > 1000:
    - narrate "You're rich!"
- else:
    - narrate "You're poor!"
Usage Example
# Use to stop a script if a player doesn't have all the prerequisites.
- if !<player.has_flag[quest_complete]> || !<player.has_permission[new_quests]> || <player.money> < 50:
    - narrate "You're not ready!"
    - stop
- narrate "Okay so your quest is to find the needle item in the haystack build next to town."
Usage Example
# Use to perform a complicated requirements test before before changing some event.
- if ( poison|magic|melting contains <context.cause> and <context.damage> > 5 ) or <player.has_flag[weak]>:
    - determine <context.damage.mul[2]>
Groupqueue
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/queue/IfCommand.java#L28
NameMongo
Syntaxmongo [id:<ID>] [connect:<uri> database:<database> collection:<collection>/disconnect/command:<map>/find:<map> (by_id:<id>)/insert:<map>/update:<update> new:<new> (upsert:true/{false})/use_database:<database>/use_collection:<collection>]
Short DescriptionInteracts with a MongoDB server.
Full DescriptionThis command is used to interact with a MongoDB server.

MongoDB is a NoSQL database which uses concepts such as Documents and Collections to store data. MongoDB uses a form of JSON to represent its data.
It can interact with localhost connections as well as hosted connections (such as MongoDB's Atlas) via a connection URI.
Store your connection URI in the Denizen secrets file at 'plugins/Denizen/secrets.secret'. Refer to ObjectType:SecretTag for usage info.

Mongo works as a document-oriented database, where data is stored in Documents. Documents are stored inside Collections. Collections can contain many Documents. Collections are then stored inside Databases.

Usage of the mongo command should almost always be used as ~waitable (see Language:~waitable), as large queries and insertions can take a while to retrieve or send.

You can open a mongo connection with connect:<uri>. You must specify a database and collection to connect to with the database:<database> and collection:<collection> options.
You can change the database or collection you are connected to with use_database:<database> and use_collection:<collection>
If a Database or Collection you connect to does not exist, once you insert some data then the Database or Collection will be created automatically.

To insert Documents, use insert:<map>.
To find a specific document from fragments of data, use find:<map>. You can include MongoDB's special query filters to further refine your query. If you want to search by a Document's ID, use by_id:id.

To update a Document's data, use update:<update> with the old data, and new:<new> for the new data being updated. This will update every Document matched with the provided data.
You can also include the upsert flag, to create a new Document if the Document you are trying to update does not already exist.

As MongoDB offers a variety of commands, to run a command not wrapped here you can use command:<map>.

TODO: When opening a connection, Mongo will output a lot of data to the console. There currently is not a way to turn this off.

The mongo command is merely a wrapper, and further usage details should be gathered from an official MongoDB command reference rather than from Denizen command help.
You can view the official mongo documentation here: 🔗https://www.mongodb.com/docs/manual/introduction/.
You can view a list of commands that MongoDB supports here: 🔗https://www.mongodb.com/docs/manual/reference/command/.
Related Tags<util.mongo_connections> returns a ListTag of all the current Mongo connections.
<entry[saveName].result> returns the text result sent back from Mongo in a JSON format. JSON can be in an ElementTag or a ListTag depending on the action run.
<entry[saveName].inserted_id> returns the ID of the item that has been inserted via the `insert` action.
<entry[saveName].ok> returns the 'ok' value from the result. Used with the `command` action.
<entry[saveName].upserted_id> returns the ID the upserted item. Returned if the `upsert` bool is true when updating.
<entry[saveName].updated_count> returns the amount of Documents updated via the `update` action.
Usage Example
# Use to connect to a Mongo instance.
- ~mongo id:name connect:<secret[uri]>
Usage Example
# Use to disconnect from a Mongo instance.
- mongo id:name disconnect
Usage Example
# Run a simple command.
- ~mongo id:name command:[dbStats=1]
Usage Example
# Run more complex commands.
- definemap commands:
     count: my_collection
     skip: 4
 - ~mongo id:name command:<[commands]>
Usage Example
# Simple find query.
- ~mongo id:name find:[name=Bob]
Usage Example
# Complex find query with query filters.
- definemap filters:
     $and:
         - number_greater_than:
             $gt: 2
         - number_less_than:
             $lt: 5
- ~mongo id:name find:<[filters]>
Usage Example
# Insert data into a Collection.
- definemap data:
     name: Pluto
     order_from_sun: 9
     has_rings: false
     main_atmosphere:
         - N2
         - CH4
         - CO
- ~mongo id:name insert:<[data]> save:mg
Usage Example
# Update data.
- definemap old_data:
     name: Pluto
- definemap new_data:
     $set:
         name: Pluto (A Dwarf Planet)
- ~mongo id:name update:<[old_data]> new:<[new_data]>
Usage Example
# Change Databases.
- ~mongo id:name use_database:my_new_database
Usage Example
# Change Collections.
- ~mongo id:name use_collection:my_new_collection
Groupcore
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/core/MongoCommand.java#L36
NameRemove
Syntaxremove [<entity>|...] (world:<world>)
Short DescriptionDespawns an entity or list of entities, permanently removing any NPCs.
Full DescriptionRemoves the selected entity. May also take a list of entities to remove.

Any NPC removed this way is completely removed, as if by '/npc remove'.
For temporary NPC removal, see Command:despawn.

If a generic entity name is given (like 'zombie'), this will remove all entities of that type from the given world.
Optionally, you may specify a world to target.
(Defaults to the world of the player running the command)
Related Tags<EntityTag.is_spawned> Returns whether the entity is spawned.
Usage Example
# Use to remove the entity the player is looking at.
- remove <player.target>
Usage Example
# Use to remove all nearby entities around the player, excluding the player itself.
- remove <player.location.find_entities.within[10].exclude[<player>]>
Usage Example
# Use to remove all dropped items in the world called cookies.
- remove dropped_item world:cookies
Groupentity
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/RemoveCommand.java#L28
NameToast
Syntaxtoast [<text>] (targets:<player>|...) (icon:<item>) (frame:{task}/challenge/goal)
Short DescriptionShows the player a custom advancement toast.
Full DescriptionDisplays a client-side custom advancement "toast" notification popup to the player(s).
If no target is specified it will default to the attached player.
The icon argument changes the icon displayed in the toast pop-up notification.
The frame argument changes the type of advancement.

As of MC 1.20, an icon is required. Dirt will be used if it is missing.
Related TagsNone
Usage Example
# Welcomes the player with an advancement toast.
- toast "Welcome <player.name>!"
Usage Example
# Sends the player an advancement toast with a custom icon.
- toast "Diggy Diggy Hole" icon:iron_spade
Usage Example
# Sends the player a "Challenge Complete!" type advancement toast.
- toast "You finished a challenge!" frame:challenge icon:diamond
Groupplayer
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/player/ToastCommand.java#L34
NameWebget
Syntaxwebget [<url>] (data:<data>) (method:<method>) (headers:<map>) (timeout:<duration>/{10s}) (savefile:<path>) (hide_failure)
Short DescriptionGets the contents of a web page or API response.
Full DescriptionConnects to a webpage or API and downloads its contents, to be used via the save argument and corresponding entry tags.

This should almost always be ~waited for. Refer to Language:~waitable.

Note that while this will replace URL spaces to %20, you are responsible for any other necessary URL encoding.
You may want to use the Tag:ElementTag.url_encode tag for this.

Optionally, use "data:<data>" to specify a set of data to send to the server (changes the default method from GET to POST).
A BinaryTag input will be used directly - any other input will be treated as a String and encoded as UTF-8.

Optionally, use "method:<method>" to specify the HTTP method to use in your request.
Can be: GET, POST, HEAD, OPTIONS, PUT, DELETE, TRACE, PATCH.

Optionally, use "headers:" to specify a MapTag of headers.

Optionally, use "savefile:" to specify a path to save the retrieved file to.
This will remove the 'result' entry savedata.
Path is relative to server base directory.

Optionally, specify the "timeout:" to set how long the command should wait for a webpage to load before giving up. Defaults to 10 seconds.

Optionally, specify 'hide_failure' to indicate that connection errors are acceptable and shouldn't display in logs.

This command accepts secret inputs via ObjectType:SecretTag as the URL or as the value of any header.
Note that you cannot mix secret with non-secret - meaning, "webget <secret[my_secret]>" and "webget https://example.com" are both valid, but "webget https://example.com/<secret[my_secret]>" is not.
Similarly, for headers, each individual header value can either be a secret or not a secret.
Related Tags<entry[saveName].failed> returns whether the webget failed. A failure occurs when the status is not 2XX/3XX or webget failed to connect.
<entry[saveName].result> returns the text of the result of the webget. This is null only if webget failed to connect to the url.
<entry[saveName].result_binary> returns the raw binary data of the result of the webget. This is null only if webget failed to connect to the url.
<entry[saveName].result_headers> returns a MapTag of the headers returned from the webserver. Every value in the result is a list.
<entry[saveName].status> returns the HTTP status code of the webget. This is null only if webget failed to connect to the url.
<entry[saveName].time_ran> returns a DurationTag indicating how long the web connection processing took.
<ElementTag.url_encode> Encodes the element using URL encoding.
Usage Example
# Use to download the google home page.
- ~webget https://google.com save:google
- narrate <entry[google].result>
Usage Example
# Use to save a webpage to your server's base directory
- ~webget https://google.com savefile:google.html
Usage Example
# Use to post data to a server.
- ~webget https://api.mojang.com/orders/statistics 'data:{"metricKeys":["item_sold_minecraft"]}' headers:<map.with[Content-Type].as[application/json]> save:request
- narrate <entry[request].result>
Usage Example
# Use to retrieve and load an API response into yaml.
- ~webget https://api.mojang.com/users/profiles/minecraft/<player.name> save:request
- yaml loadtext:<entry[request].result> id:player_data
Synonyms (Search Aid)wget
Groupcore
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/core/WebGetCommand.java#L39

Language


NamePotion Effect Format
DescriptionPotion effects (be it on an entity, given by a potion, etc.) are represented in Denizen as ObjectType:MapTags with the following keys:
- effect: the effect type given by the effect, see 🔗https://minecraft.wiki/w/Effect#Descriptions.
- amplifier: the number to increase the effect level by, usually controls how powerful its effects are (optional for input, defaults to 0 which is level 1).
- duration (ObjectType:DurationTag): how long the effect should last (optional for input, defaults to 0s).
- ambient: a boolean (true/false) for whether the effect's particles should be more translucent and less intrusive, like effects given by a beacon (optional for input, defaults to true).
- particles: a boolean (true/false) for whether the effect should display particles (optional for input, defaults to true).
- icon: a boolean (true/false) for whether the effect should have an icon on a player's HUD when applied (optional for input, defaults to false).

For example, [effect=speed;amplifier=2;duration=10s;ambient=false;particles=true;icon=true] would be a level 3 speed effect that lasts 10 seconds, with (normal) particles and an icon.
GroupMinecraft Logic
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemPotion.java#L32

ObjectType


NameListTag
Prefixli@
Base TypeElementTag
Identity FormatThe identity format for ListTags is each item, one after the other, in order, separated by a pipe '|' symbol.
For example, for a list of 'taco', 'potatoes', and 'cheese', it would be 'li@taco|potatoes|cheese|'
A list with zero items in it is simply 'li@',
and a list with one item is just the one item and a pipe on the end.

If the pipe symbol "|" appears in a list entry, it will be replaced by "&pipe",
similarly if an ampersand "&" appears in a list entry, it will be replaced by "&amp".
This is a subset of Denizen standard escaping, see Language:Escaping System.
DescriptionA ListTag is a list of any data. It can hold any number of objects in any order.
The objects can be of any Denizen object type, including another list.

List indices start at 1 (so, the tag 'get[1]' gets the very first entry)
and extend to however many entries the list has (so, if a list has 15 entries, the tag 'get[15]' gets the very last entry).

Inputs that accept list indices will generally accept 'first' to mean '1', 'last' to mean the last entry in the list,
or negative numbers to automatically select an index starting at the end - so for example 'get[-1]' gets the last entry, 'get[-2]' gets the second-to-last, etc.
Synonyms (Search Aid)arraytag
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L32
NameMapTag
Prefixmap@
Base TypeElementTag
Identity FormatThe identity format for MapTags is a replica of property syntax - square brackets surrounded a semi-colon separated list of key=value pairs.
For example, a map of "taco" to "food", "chicken" to "animal", and "bob" to "person" would be "map@[taco=food;chicken=animal;bob=person]"
A map with zero items in it is simply 'map@[]'.

If the semicolon symbol ";" appears in a key or value, it will be replaced by "&sc", an equal sign "=" will become "&eq",
a left bracket "[" will become "&lb", a right bracket "]" will become "&rb", and an ampersand "&" will become "&amp".
This is a subset of Denizen standard escaping, see Language:Escaping System.
DescriptionA MapTag represents a mapping of keys to values.
Keys are plain text, case-insensitive.
Values can be anything, even lists or maps themselves.

Any given key can only appear in a map once (ie, no duplicate keys).
Values can be duplicated into multiple keys without issue.

Order of keys is preserved. Casing in keys is preserved in the object but ignored for map lookups.
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/MapTag.java#L25

Tag


Name<EntityTag.equipment>
ReturnsListTag(ItemTag)
MechanismEntityTag.equipment
DescriptionDeprecated in favor of Tag:EntityTag.equipment_map.
Generated Example
- foreach <player.equipment> as:entry:
    - narrate "found <[entry]>"
Groupinventory
DeprecatedUse 'EntityTag.equipment_map'.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityEquipment.java#L57
Name<EntityTag.horse_armor>
ReturnsItemTag
DescriptionDeprecated in favor of Tag:EntityTag.equipment_map with the 'body' key on MC 1.20+.
Generated Example
- give <player.horse_armor>
Groupinventory
DeprecatedUse 'EntityTag.equipment_map.get[body]' on MC 1.20+.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EntityTag.java#L1446
Name<ShopKeeperTag.trades>
ReturnsListTag(ListTag(ItemTag))
DescriptionReturns a ListTag of the Shopkeeper's trades (as sub-lists).
RequiresDepenizen, ShopKeepers
Sourcehttps://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/objects/shopkeepers/ShopKeeperTag.java#L131
Name<TradeTag.result>
ReturnsItemTag
MechanismTradeTag.result
Description(Property) Returns what the trade will give the player.
Generated Example
- give <trade[trade[result=diamond;max_uses=10;inputs=stick]].result>
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/trade/TradeResult.java#L9