item out of 3939 meta-documentation entries...| Name | item |
| Object | EntityTag |
| Input | ItemTag |
| 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 | |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityItem.java#L13 |
| Name | <item[<item>]> |
| Returns | ItemTag |
| Description | Returns an item object constructed from the input value.
Refer to ItemTag. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/utilities/CommonRegistries.java#L238 |
| Name | DisplayItem |
| Syntax | displayitem [<item>] [<location>] (duration:<value>) |
| Short Description | Makes a non-touchable item spawn for players to view. |
| Full Description | This 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 | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Group | item |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/item/DisplayItemCommand.java#L38 |
| Name | FakeItem |
| Syntax | fakeitem [<item>|...] [slot:<slot>] (duration:<duration>) (players:<player>|...) (raw) |
| Short Description | Show a fake item in a player's inventory. |
| Full Description | This 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 PlayerTag.fake_equipment instead. The slot argument can be any valid slot, see Slot Inputs. Optionally specify 'raw' to indicate that the slow is a raw network slot ID. |
| Related Tags | None
|
| Usage Example | |
| Group | item |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/item/FakeItemCommand.java#L39 |
| Name | ItemCooldown |
| Syntax | itemcooldown [<material>|...] (duration:<duration>) |
| Short Description | Places a cooldown on a material in a player's inventory. |
| Full Description | Places 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 | |
| Usage Example | |
| Group | player |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/player/ItemCooldownCommand.java#L26 |
| Name | block cooks|smelts item into item |
| Event Lines | <block> cooks|smelts <item> (into <item>) |
| Triggers | when an item is smelted/cooked by a block. |
| Generated Examples | on 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.
|
| Determine | ItemTag to set the item that is the result of the smelting/cooking. |
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Block |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/block/BlockCooksSmeltsItemScriptEvent.java#L13 |
| Name | block dispenses item |
| Event Lines | <block> dispenses <item> |
| Triggers | when a block dispenses a single item. |
| Generated Examples | after 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.
|
| Determine | LocationTag to set the velocity the item will be shot at.
"ITEM:<ItemTag>" to set the item being shot. |
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Block |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/block/BlockDispensesScriptEvent.java#L15 |
| Name | block tries to dispense item |
| Event Lines | <block> tries to dispense <item> |
| Triggers | before 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 Examples | on 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.
|
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Block |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/events/BlockPreDispenseScriptEvent.java#L14 |
| Name | entity drops item |
| Event Lines | <entity> drops <item> |
| Triggers | when an entity drops an item. |
| Generated Examples | after trident drops item:
after mob drops rose_bush: |
| Has Player | When the entity dropping an item is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Contexts | <context.item> returns the ItemTag.
<context.entity> returns a EntityTag of the item.
<context.dropped_by> returns the EntityTag that dropped the item.
<context.location> returns a LocationTag of the item's location.
|
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityDropsItemScriptEvent.java#L18 |
| Name | entity picks up item |
| Event Lines | <entity> picks up <item>
<entity> takes <item> |
| Triggers | when an entity picks up an item. |
| Generated Examples | after drowned picks up wither_skeleton_skull:
after entity takes pumpkin: after npc picks up infested_chiseled_stone_bricks: on entity takes diamond_hoe: |
| Has Player | when the entity picking up the item is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Has NPC | when the entity picking up the item is an npc. |
| Contexts | <context.item> returns an ItemTag of the item being picked up.
<context.entity> returns an EntityTag of the item entity being picked up.
<context.pickup_entity> returns an EntityTag of the entity picking up the item.
<context.location> returns a LocationTag of the item's location.
|
| Determine | "ITEM:<ItemTag>" to change the item being picked up. |
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Player |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityPicksUpItemScriptEvent.java#L20 |
| Name | inventory picks up item |
| Event Lines | <inventory> picks up <item> |
| Triggers | when a hopper or hopper minecart picks up an item. |
| Generated Examples | after 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.
|
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Item |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/item/InventoryPicksUpItemScriptEvent.java#L14 |
| Name | item despawns |
| Event Lines | <item> despawns |
| Triggers | when an item entity despawns. |
| Generated Examples | after 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.
|
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Item |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/item/ItemDespawnsScriptEvent.java#L14 |
| Name | item enchanted |
| Event Lines | <item> enchanted |
| Triggers | when an item is enchanted. |
| Generated Examples | after purple_stained_glass_pane enchanted:
after item enchanted: |
| Has Player | when the enchanter is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Switches | enchant:<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.
|
| Determine | ElementTag(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. |
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Item |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/item/ItemEnchantedScriptEvent.java#L22 |
| Name | item merges |
| Event Lines | <item> merges |
| Triggers | when an item entity merges into another item entity. |
| Generated Examples | after 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.
|
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Item |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/item/ItemMergesScriptEvent.java#L15 |
| Name | item moves from inventory to inventory |
| Event Lines | <item> moves from <inventory> (to <inventory>) |
| Triggers | when an entity or block moves an item from one inventory to another. (Hopper-style movement, not player-induced movement). |
| Generated Examples | on 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.
|
| Determine | ItemTag to set a different item to be moved. |
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Item |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/item/ItemMoveScriptEvent.java#L13 |
| Name | item recipe formed |
| Event Lines | <item> recipe formed |
| Triggers | when an item's recipe is correctly formed. |
| Generated Examples | after hoglin_spawn_egg recipe formed:
after item recipe formed: |
| Has Player | Always. - 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.
|
| Determine | ItemTag to change the item that is formed in the result slot. |
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Group | Item |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/item/ItemRecipeFormedScriptEvent.java#L23 |
| Name | item spawns |
| Event Lines | <item> spawns |
| Triggers | when an item entity spawns. |
| Generated Examples | after 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.
|
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Item |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/item/ItemSpawnsScriptEvent.java#L15 |
| Name | block drops item from breaking |
| Event Lines | block drops item from breaking
<block> drops <item> from breaking |
| Triggers | when a items drop from a block due to a player breaking the block in survival mode. |
| Generated Examples | after block drops item from breaking:
after soul_wall_torch drops item from breaking: |
| Has Player | Always. - 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.
|
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Player |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/BlockDropsItemScriptEvent.java#L19 |
| Name | block equips item |
| Event Lines | block equips <item> |
| Triggers | when armor is equipped to an entity by a dispenser. |
| Example | |
| Example | |
| Has Player | when the equipped entity is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Has NPC | when the equipped entity is an NPC. |
| Switches | on:<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. |
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Block |
| 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. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/block/BlockEquipsItemScriptEvent.java#L16 |
| Name | brewing stand fueled with item |
| Event Lines | brewing stand fueled (with <item>) |
| Triggers | when a brewing stand receives an item to use as fuel. |
| Generated Examples | on 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. |
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Block |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/block/BrewingStandFueledScriptEvent.java#L15 |
| Name | crafter crafts item |
| Event Lines | crafter crafts <item> |
| Triggers | when a crafter block crafts an item. |
| Generated Examples | after 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. |
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Block |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/block/CrafterCraftsScriptEvent.java#L15 |
| Name | entity shoots bow |
| Event Lines | entity shoots bow
<entity> shoots <item> |
| Triggers | when an entity shoots something out of a bow. |
| Generated Examples | after entity shoots bow:
after living shoots mutton: on entity shoots bow: after entity shoots oxidized_copper_door: |
| Has Player | when the entity that shot the bow is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Has NPC | when the entity that shot the bow is an NPC. |
| Contexts | <context.entity> returns the EntityTag that shot the bow.
<context.projectile> returns a EntityTag of the projectile.
<context.bow> returns the ItemTag of the bow used to shoot.
<context.force> returns the force of the shot.
<context.item> returns an ItemTag of the shot projectile, if any.
<context.hand> returns "HAND" or "OFF_HAND" for which hand the bow was in.
|
| Determine | ListTag(EntityTag) to change the projectile(s) being shot. (Note that in certain cases, determining an arrow may not be valid).
"KEEP_ITEM" to keep the projectile item on shooting it. |
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityShootsBowScriptEvent.java#L27 |
| Name | furnace burns item |
| Event Lines | furnace burns <item> |
| Triggers | when a furnace burns an item used as fuel. |
| Generated Examples | after furnace burns armadillo_scute:
after furnace burns observer: |
| Contexts | <context.location> returns the LocationTag of the furnace.
<context.item> returns the ItemTag burnt.
|
| Determine | DurationTag to set the burn time for this fuel. |
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Block |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/block/FurnaceBurnsItemScriptEvent.java#L15 |
| Name | furnace starts smelting item |
| Event Lines | furnace starts smelting <item> |
| Triggers | when a furnace starts smelting an item. |
| Generated Examples | on 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.
|
| Determine | DurationTag to set the total cook time for the item being smelted. |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Block |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/block/FurnaceStartsSmeltingScriptEvent.java#L15 |
| Name | lingering potion splash|splashes |
| Event Lines | lingering potion splash|splashes
lingering <item> splash|splashes |
| Triggers | when a lingering splash potion breaks open |
| Generated Examples | on 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.
|
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | World |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/world/LingeringPotionSplashScriptEvent.java#L16 |
| Name | player click_type clicks item in inventory |
| Event Lines | player (<click_type>) clicks (<item>) in <inventory> |
| Triggers | when a player clicks in an inventory. Note that you likely will also want to listen to player drags in inventory. |
| Generated Examples | after player click_type clicks wooden_axe in inventory:
after player clicks in cartography: |
| Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Switches | with:<item> to only process the event if 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 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 Inventory Actions.
<context.hotbar_button> returns an ElementTag of the button pressed as a number, or 0 if no number button was pressed.
|
| Determine | ItemTag to set the current item for the event. |
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Player |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerClicksInInventoryScriptEvent.java#L70 |
| Name | player breaks held item |
| Event Lines | player breaks held item
player breaks held <item> |
| Triggers | when a player breaks the item they are holding. |
| Generated Examples | after 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 Player | Always. - 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.
|
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Player |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerBreaksItemScriptEvent.java#L21 |
| Name | player changes armor stand item |
| Event Lines | player changes armor stand item |
| Triggers | when a player modifies an armor stand entity. |
| Generated Examples | after player changes armor stand item:
on player changes armor stand item: |
| Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Switches | from:<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.
|
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Player |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerArmorStandManipulateScriptEvent.java#L18 |
| Name | player changes framed item |
| Event Lines | player changes framed <item> |
| Triggers | when a player interacts with an item frame by adding, removing, or rotating the item held in it. |
| Generated Examples | after player changes framed rooted_dirt:
after player changes framed light_blue_banner: |
| Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Switches | frame:<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. |
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Paper |
| Requires | Paper |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/events/PlayerChangesFramedItemScriptEvent.java#L16 |
| Name | player consumes item |
| Event Lines | player consumes item
player consumes <item> |
| Triggers | when a player consumes (eats/drinks) an item (like food or potions). |
| Generated Examples | on player consumes item:
after player consumes item: after player consumes red_banner: |
| Has Player | Always. - 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.
|
| Determine | ItemTag to change the item being consumed. Use with caution, if the player is eating a stack of items, this will replace the entire stack. |
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Player |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerConsumesScriptEvent.java#L21 |
| Name | player crafts item |
| Event Lines | player crafts item
player crafts <item> |
| Triggers | when a player fully crafts an item. |
| Generated Examples | after player crafts item:
on player crafts item: on player crafts dead_horn_coral_block: |
| Has Player | Always. - 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
|
| Determine | ItemTag to change the item that is crafted. |
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Group | Player |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerCraftsItemScriptEvent.java#L25 |
| Name | player drags in inventory |
| Event Lines | player drags in inventory
player drags (<item>) (in <inventory>) |
| Triggers | when a player drags in an inventory (that is, clicks and then holds the mouse button down while moving the mouse across multiple slots). |
| Generated Examples | after player drags in inventory:
after player drags item: on player drags in inventory: on player drags ward_armor_trim_smithing_template in dropper: |
| Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Switches | in_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.
|
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Player |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerDragsInInvScriptEvent.java#L25 |
| Name | player empties bucket |
| Event Lines | player empties bucket
player empties <item> |
| Triggers | when a player empties a bucket. |
| Generated Examples | after player empties bucket:
after player empties music_disc_cat: after player empties item: |
| Has Player | Always. - 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.
|
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Player |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerEmptiesBucketScriptEvent.java#L17 |
| Name | player equips|unequips armor|helmet|chestplate|leggings|boots |
| Event Lines | player equips|unequips armor|helmet|chestplate|leggings|boots
player equips|unequips <item> |
| Triggers | when a player (un)equips armor. |
| Generated Examples | after player unequips leggings:
on player unequips item: on player equips chestplate: after player unequips light_gray_concrete_powder: |
| Has Player | Always. - 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.
|
| Group | Paper |
| Requires | Paper |
| Warning(s) | This event is not reliable, and may miss some types of equipment changes or fire when equipment hasn't actually changed. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/events/PlayerEquipsArmorScriptEvent.java#L22 |
| Name | player fills bucket |
| Event Lines | player fills bucket
player fills <item> |
| Triggers | when a player fills a bucket. |
| Generated Examples | after player fills bucket:
after player fills prismarine_crystals: after player fills item: |
| Has Player | Always. - 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.
|
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Player |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerFillsBucketScriptEvent.java#L17 |
| Name | player fishes entity while state |
| Event Lines | player fishes (<entity>) (while <state>)
player fishes (<item>) (while <state>) |
| Triggers | when a player uses a fishing rod. |
| Generated Examples | after player fishes:
after player fishes oak_pressure_plate while state: on player fishes while state: |
| Has Player | If the fisher or the caught entity is a player (in most cases, the fisher can be assumed to be a real player). - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Has NPC | If the fisher or the caught entity is an NPC. |
| Switches | with:<item> to only process the event if the fishing rod is a specified item. |
| Contexts | <context.hook> returns an EntityTag of the hook.
<context.state> returns an ElementTag of the fishing state. Valid states: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerFishEvent.State.html
<context.entity> returns an EntityTag of the entity that got caught.
<context.item> returns an ItemTag of the item gotten, if any.
<context.xp> returns the amount of experience that will drop.
|
| Determine | "CAUGHT:<ItemTag>" to change the item that was caught (only if an item was already being caught).
"XP:<ElementTag(Number)>" to change how much experience will drop. |
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Player |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerFishesScriptEvent.java#L21 |
| Name | player item takes damage |
| Event Lines | player item takes damage
player <item> takes damage |
| Triggers | when the player damages an item. |
| Generated Examples | after player item takes damage:
after player end_stone takes damage: on player item takes damage: |
| Has Player | Always. - 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.
|
| Determine | ElementTag(Number) to set the amount of damage the item will take. |
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Synonyms (Search Aid) | item durability changes |
| Group | Player |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerItemTakesDamageScriptEvent.java#L20 |
| Name | player mends item |
| Event Lines | player mends item
player mends <item> |
| Triggers | when an XP orb is used to repair an item with the Mending enchantment in the player's inventory. |
| Generated Examples | after player mends item:
after player mends chiseled_polished_blackstone: on player mends item: |
| Has Player | Always. - 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.
|
| Determine | ElementTag(Number) to set the amount of durability the item recovers. |
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Player |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerMendsItemScriptEvent.java#L18 |
| Name | player places block |
| Event Lines | player places block
player places <item> |
| Triggers | when a player places a block. |
| Example | |
| Example | |
| Example | |
| Example | |
| Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Switches | using:<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.
|
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Player |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerPlacesBlockScriptEvent.java#L18 |
| Name | player prepares anvil craft item |
| Event Lines | player prepares anvil craft item
player prepares anvil craft <item> |
| Triggers | when a player prepares an anvil to craft an item. |
| Generated Examples | on player prepares anvil craft item:
on player prepares anvil craft iron_bars: |
| Has Player | Always. - 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.
|
| Determine | ElementTag(Number) to set the repair cost.
ItemTag to change the item that is crafted. |
| Group | Player |
| Warning(s) | The player doing the crafting is estimated and may be inaccurate. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerPreparesAnvilCraftScriptEvent.java#L19 |
| Name | player prepares grindstone craft item |
| Event Lines | player prepares grindstone craft <item> |
| Triggers | when a player prepares to grind an item. |
| Example | |
| Has Player | Always. - 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 Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Player |
| Requires | Paper |
| Warning(s) | The player doing the grinding is estimated and may be inaccurate. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/events/PlayerPreparesGrindstoneCraftScriptEvent.java#L16 |
| Name | player prepares item enchant |
| Event Lines | player prepares item enchant
player prepares <item> enchant |
| Triggers | when a player prepares to enchant an item. |
| Generated Examples | after player prepares item enchant:
after player prepares light_gray_terracotta enchant: on player prepares item enchant: after player prepares spruce_hanging_sign enchant: |
| Has Player | Always. - 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. |
| Group | Player |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerPreparesEnchantScriptEvent.java#L20 |
| Name | player prepares smithing item |
| Event Lines | player prepares smithing item
player prepares smithing <item> |
| Triggers | when a player prepares to upgrade an item on a smithing table. |
| Generated Examples | on player prepares smithing item:
after player prepares smithing item: after player prepares smithing tuff_brick_slab: |
| Has Player | Always. - 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.
|
| Determine | ItemTag to change the item that results from the upgrade. |
| Group | Player |
| Warning(s) | The player doing the smithing is estimated and may be inaccurate. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerPreparesSmithingTableScriptEvent.java#L18 |
| Name | player raises|lowers|toggles item |
| Event Lines | player raises|lowers|toggles <item> |
| Triggers | when a player starts or stops holding up an item, such as a shield, spyglass, or crossbow. |
| Generated Examples | on player toggles hopper:
after player raises yellow_bed: |
| Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Switches | reason:<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 Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Synonyms (Search Aid) | player raises shield, player raises spyglass |
| Group | Player |
| 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. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerRaiseLowerItemScriptEvent.java#L28 |
| Name | player scrolls their hotbar |
| Event Lines | player scrolls their hotbar
player holds item |
| Triggers | when a player scrolls through their hotbar. |
| Generated Examples | after player scrolls their hotbar:
after player holds item: on player scrolls their hotbar: on player holds item: |
| Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Switches | item:<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.
|
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Player |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/HotbarScrollScriptEvent.java#L15 |
| Name | player smiths item |
| Event Lines | player smiths item
player smiths <item> |
| Triggers | when a player upgrades an item on a smithing table. |
| Generated Examples | on player smiths item:
on player smiths light_gray_shulker_box: after player smiths item: after player smiths waxed_weathered_copper_grate: |
| Has Player | Always. - 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.
|
| Determine | ItemTag to change the item that results from the upgrade. |
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Group | Player |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerSmithsItemScriptEvent.java#L19 |
| Name | player swaps items |
| Event Lines | player swaps items |
| Triggers | when a player swaps the items in their main and off hands. |
| Generated Examples | after player swaps items: |
| Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Switches | main:<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. |
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Group | Player |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerSwapsItemsScriptEvent.java#L17 |
| Name | player takes item from furnace |
| Event Lines | player takes item from furnace
player takes <item> from furnace |
| Triggers | when a player takes an item from a furnace. |
| Generated Examples | after player takes item from furnace:
on player takes tube_coral_fan from furnace: after player takes black_concrete from furnace: |
| Has Player | Always. - 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.
|
| Determine | ElementTag(Number) to set the amount of experience the player will get. |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Player |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerTakesFromFurnaceScriptEvent.java#L17 |
| Name | player takes item from lectern |
| Event Lines | player takes item from lectern
player takes <item> from lectern |
| Triggers | when a player takes a book from a lectern. |
| Generated Examples | after player takes item from lectern:
on player takes item from lectern: on player takes ocelot_spawn_egg from lectern: |
| Has Player | Always. - 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.
|
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Player |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerTakesFromLecternScriptEvent.java#L17 |
| Name | potion splash|splashes |
| Event Lines | potion splash|splashes
<item> splash|splashes |
| Triggers | when a splash potion breaks open. |
| Example | |
| 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.
|
| Determine | INTENSITY:<ListTag(MapTag)>" to set the intensity of specified entities. |
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | World |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/world/PotionSplashScriptEvent.java#L25 |
| Name | vault displays item |
| Event Lines | vault displays <item> |
| Triggers | when a vault block displays an item. |
| Generated Examples | after 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. |
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Block |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/block/VaultDisplaysItemScriptEvent.java#L13 |
| Name | Item Components |
| Description | Minecraft 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 ItemTag.is_overridden) accept both Minecraft component names and Denizen property names. Here is an example of applying all of this in a script: |
| Group | Minecraft Logic |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/datacomponents/DataComponentAdapter.java#L25 |
| Name | Item Script Containers |
| Description | Item 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. |
| Group | Script Container System |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/containers/core/ItemScriptContainer.java#L30 |
| Name | can_pickup_items |
| Object | EntityTag |
| Input | ElementTag(Boolean) |
| Related Tags | <EntityTag.can_pickup_items> Returns whether the entity can pick up items.
|
| Description | Sets whether the entity can pick up items.
The entity must be living. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EntityTag.java#L3497 |
| Name | damage_item |
| Object | EntityTag |
| Input | MapTag |
| Description | Damages 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 | |
| Group | paper |
| Requires | Paper |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/properties/PaperEntityExtensions.java#L160 |
| Name | drops_item |
| Object | EntityTag |
| Input | ElementTag(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 EntityTag.item for controlling an eye's item. |
| Generated Example | |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityDropsItem.java#L10 |
| Name | fallingblock_drop_item |
| Object | EntityTag |
| Input | ElementTag(Boolean) |
| Description | Sets whether the falling block will drop an item if broken. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EntityTag.java#L3524 |
| Name | firework_item |
| Object | EntityTag |
| Input | ItemTag |
| Related Tags | <EntityTag.firework_item> If the entity is a firework, returns the firework item used to launch it.
|
| Description | Changes the firework effect on this entity, using a firework item. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityFirework.java#L82 |
| Name | item_in_hand |
| Object | EntityTag |
| Input | ItemTag |
| Related Tags | <EntityTag.item_in_hand> Returns the item the entity is holding, or air if none.
|
| Description | Sets the item in the entity's hand.
The entity must be living. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityItemInHand.java#L90 |
| Name | item_in_offhand |
| Object | EntityTag |
| Input | ItemTag |
| Related Tags | <EntityTag.item_in_offhand> Returns the item the entity is holding in their off hand, or air if none.
|
| Description | Sets the item in the entity's offhand.
The entity must be living. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityItemInOffHand.java#L90 |
| Name | add_attribute_modifiers |
| Object | ItemTag |
| Input | MapTag |
| 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 | Adds attribute modifiers to an item without altering existing modifiers.
For input format details, refer to attribute modifiers. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemAttributeModifiers.java#L122 |
| Name | add_charged_projectile |
| Object | ItemTag |
| Input | 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.
|
| Description | Adds a new charged projectile item on this crossbow. Charged projectiles may only be arrows and fireworks. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemChargedProjectile.java#L130 |
| Name | armor_pose |
| Object | ItemTag |
| Input | MapTag |
| 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 |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemArmorPose.java#L22 |
| Name | armor_stand_data |
| Object | ItemTag |
| Input | MapTag |
| Related Tags | <ItemTag.armor_stand_data> Returns a map of basic armor stand data, with keys matching EntityTag property names. (...)
|
| Description | Sets a map of basic armor stand data, with keys matching EntityTag property names.
Allowed keys: base_plate, visible, marker, is_small, arms |
| Group | properties |
| Requires | Paper |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/properties/ItemArmorStand.java#L85 |
| Name | attribute_modifiers |
| Object | ItemTag |
| Input | MapTag |
| 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 attribute modifiers. |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemAttributeModifiers.java#L30 |
| Name | base_color |
| Object | ItemTag |
| Input | ElementTag |
| 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. |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemBaseColor.java#L12 |
| Name | block_material |
| Object | ItemTag |
| Input | MaterialTag |
| Related Tags | <ItemTag.block_material> Returns the material for an item with complex-block-data attached.
|
| Description | Attaches complex-block-data from a material to an item. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemBlockMaterial.java#L84 |
| Name | book |
| Object | ItemTag |
| Input | MapTag |
| 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.
|
| Description | Changes the information on a book item.
Can have keys "pages" (a ListTag), "title", and "author", all optional. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemBook.java#L206 |
| Name | book_author |
| Object | ItemTag |
| Input | ElementTag |
| Related Tags | <ItemTag.book_author> Returns the author of the book.
|
| Description | Changes the author of a book item. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemBook.java#L168 |
| Name | book_generation |
| Object | ItemTag |
| Input | ListTag |
| Related Tags | <ItemTag.book_generation> Returns the generation of the book (if any), as ORIGINAL, COPY_OF_ORIGINAL, COPY_OF_COPY, or TATTERED.
|
| Description | Sets the generation of the book (if any), as ORIGINAL, COPY_OF_ORIGINAL, COPY_OF_COPY, or TATTERED. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemBookGeneration.java#L84 |
| Name | book_pages |
| Object | ItemTag |
| Input | ListTag |
| Related Tags | <ItemTag.book_pages> Returns the plain-text pages of the book as a ListTag.
|
| Description | Changes the plain-text pages of a book item. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemBook.java#L149 |
| Name | book_title |
| Object | ItemTag |
| Input | ElementTag |
| Related Tags | <ItemTag.book_title> Returns the title of the book.
|
| Description | Changes the title of a book item. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemBook.java#L187 |
| Name | can_destroy |
| Object | ItemTag |
| Input | ListTag(MaterialTag) |
| Related Tags | <ItemTag.can_destroy> Returns a list of materials this item can destroy while in adventure mode, if any.
|
| Description | Sets the materials this item can destroy while in adventure mode.
Leave empty to remove this property. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemCanDestroy.java#L99 |
| Name | can_place_on |
| Object | ItemTag |
| Input | ListTag(MaterialTag) |
| Related Tags | <ItemTag.can_place_on> Returns a list of materials this item can be placed on while in adventure mode, if any.
|
| Description | Sets the materials this item can be placed on while in adventure mode.
Leave empty to remove this property. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemCanPlaceOn.java#L99 |
| Name | charged_projectiles |
| Object | ItemTag |
| Input | ListTag(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.
|
| Description | Sets the charged projectile items on this crossbow. Charged projectiles may only be arrows and fireworks. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemChargedProjectile.java#L106 |
| Name | color |
| Object | ItemTag |
| Input | ColorTag |
| 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 | |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemColor.java#L15 |
| Name | components_patch |
| Object | ItemTag |
| Input | MapTag |
| 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 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 ItemTag.custom_data. |
| Group | Properties |
| Warning(s) | Due to this being a direct representation of internal data, compatibility for script usage across versions is not guaranteed. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemComponentsPatch.java#L21 |
| Name | custom_data |
| Object | ItemTag |
| Input | MapTag |
| 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 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. |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemCustomData.java#L13 |
| Name | custom_model_data |
| Object | ItemTag |
| Input | ElementTag(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 ItemTag.item_model on MC 1.21+. See also ItemTag.has_custom_model_data |
| Generated Example | |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemCustomModel.java#L11 |
| Name | display |
| Object | ItemTag |
| Input | ElementTag |
| Related Tags | <ItemTag.display> Returns the display name of the item, as set by plugin or an anvil.
|
| Description | Changes the item's display name.
Give no input to remove the item's display name. |
| Synonyms (Search Aid) | itemtag.display_name |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemDisplayname.java#L111 |
| Name | durability |
| Object | ItemTag |
| Input | ElementTag(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 Item Components.
<ItemTag.repairable> Returns whether the item can be repaired. (...)
|
| Description | Changes the durability of damageable items. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemDurability.java#L96 |
| Name | enchantments |
| Object | ItemTag |
| Input | MapTag |
| Related Tags | <ItemTag.enchantment_map> Returns a map of enchantments on the item. (...)
|
| Description | Sets 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 ItemTag.remove_enchantments |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemEnchantments.java#L239 |
| Name | essentials_worth |
| Object | ItemTag |
| Input | ElementTag(Decimal) |
| Related Tags | <ItemTag.essentials_worth> Returns the amount of money one of this item is worth in Essentials.
|
| Description | Sets the worth of this item in Essentials. |
| Generated Example | |
| Requires | Depenizen, Essentials |
| Source | https://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/properties/essentials/EssentialsItemExtensions.java#L77 |
| Name | firework |
| Object | ItemTag |
| Input | ListTag |
| 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.
|
| Description | Sets 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. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemFirework.java#L160 |
| Name | firework_power |
| Object | ItemTag |
| Input | ElementTag(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 | |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemFireworkPower.java#L10 |
| Name | flag |
| Object | ItemTag |
| Input | ObjectTag |
| 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. (...)
|
| Description | Modifies a flag on this item, using syntax similar to flag.
For example, 'flag:myflagname:!' will remove flag 'myflagname', or 'flag:myflagname:3' sets flag 'myflagname' to value '3'. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemFlags.java#L119 |
| Name | flag_map |
| Object | ItemTag |
| Input | MapTag |
| Description | Internal-usage direct re-setter for the item's full raw flag data. |
| Deprecated | Internal-usage only. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemFlags.java#L107 |
| Name | food |
| Object | ItemTag |
| Input | MapTag |
| Related Tags | <ItemTag.food> (Property) Returns an item's food Item Components. (...)
|
| Description | (Property) Sets an item's food 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. |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/datacomponents/FoodAdapter.java#L11 |
| Name | full_render |
| Object | ItemTag |
| Input | ElementTag |
| 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).
|
| Description | Fully 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 | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemMap.java#L167 |
| Name | glider |
| Object | ItemTag |
| Input | ElementTag(Boolean) |
| Related Tags | <ItemTag.glider> (Property) Returns whether an item can be used to glide when equipped (like elytras by default), see Item Components.
|
| Description | (Property) Sets whether an item can be used to glide when equipped (like elytras by default), see Item Components.
Provide no input to reset the item to its default value. |
| Generated Example | |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/datacomponents/GliderAdapter.java#L7 |
| Name | hides |
| Object | ItemTag |
| Input | ListTag |
| Related Tags | <ItemTag.hides> Returns a list of item data types to be hidden from view on this item. (...)
|
| Description | Sets 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. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemHidden.java#L122 |
| Name | instrument |
| Object | ItemTag |
| Input | ElementTag |
| 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 | |
| Example | |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemInstrument.java#L12 |
| Name | inventory_contents |
| Object | ItemTag |
| Input | ListTag(ItemTag) |
| Related Tags | <ItemTag.inventory_contents> (Property) A container item's inventory contents.
|
| Description | (Property) A container item's inventory contents. |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemInventoryContents.java#L28 |
| Name | invisible |
| Object | ItemTag |
| Input | ElementTag(Boolean) |
| Related Tags | <ItemTag.invisible> Returns whether an Item_Frame item will be invisible when placed.
|
| Description | Changes whether an Item_Frame item will be invisible when placed. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemFrameInvisible.java#L87 |
| Name | is_waxed |
| Object | ItemTag |
| Input | ElementTag(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 | |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemSignIsWaxed.java#L13 |
| Name | item_model |
| Object | ItemTag |
| Input | ElementTag |
| Related Tags | <ItemTag.item_model> (Property) Returns an item's model Item Components in namespaced key format. (...)
|
| Description | (Property) Sets an item's model 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. |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/datacomponents/ItemModelAdapter.java#L11 |
| Name | knowledge_book_recipes |
| Object | ItemTag |
| Input | ListTag |
| 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". (...)
|
| Description | Sets the item's knowledge book recipe list, in the Namespace:Key format. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemKnowledgeBookRecipes.java#L98 |
| Name | lock |
| Object | ItemTag |
| Input | ElementTag |
| 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. (...)
|
| Description | Sets the item's lock password.
Locked blocks can only be opened while holding an item with the name of the lock. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemLock.java#L102 |
| Name | lodestone_location |
| Object | ItemTag |
| Input | LocationTag |
| Related Tags | <ItemTag.lodestone_location> Returns the lodestone location this compass is pointing at (if any). (...)
|
| Description | Changes the lodestone location this compass is pointing at.
See also ItemTag.lodestone_tracked Give no input to unset. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemLodestoneLocation.java#L96 |
| Name | lodestone_tracked |
| Object | ItemTag |
| Input | ElementTag(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. (...)
|
| Description | Changes 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 ItemTag.lodestone_location |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemLodestoneTracked.java#L80 |
| Name | lore |
| Object | ItemTag |
| Input | ListTag |
| Related Tags | <ItemTag.lore> Returns lore as a ListTag.
|
| Description | Sets the item's lore. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemLore.java#L114 |
| Name | map |
| Object | ItemTag |
| Input | ElementTag(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).
|
| Description | Changes what map ID number a map item uses. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemMap.java#L153 |
| Name | map_center |
| Object | ItemTag |
| Input | LocationTag |
| Related Tags | <ItemTag.map_center> Returns the center location on the map's display. (...)
|
| Description | Sets the map's center location (the location in the middle of the map's display). |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemMap.java#L231 |
| Name | map_locked |
| Object | ItemTag |
| Input | ElementTag(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.
|
| Description | Changes whether the map is currently locked.
Note that this applies globally to all map items with the same ID. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemMap.java#L211 |
| Name | material |
| Object | ItemTag |
| Input | MaterialTag |
| Related Tags | <ItemTag.material> Returns the MaterialTag that is the basis of the item. (...)
|
| Description | Changes 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 | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/ItemTag.java#L735 |
| Name | max_durability |
| Object | ItemTag |
| Input | ElementTag(Number) |
| Related Tags | <ItemTag.max_durability> (Property) Returns an item's max durability Item Components.
|
| Description | (Property) Sets an item's max durability Item Components.
Provide no input to reset the item to its default value. |
| Generated Example | |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/datacomponents/MaxDurabilityAdapter.java#L9 |
| Name | max_stack_size |
| Object | ItemTag |
| Input | ElementTag(Number) |
| Related Tags | <ItemTag.max_stack_size> (Property) Returns an item's max stack size Item Components.
|
| Description | (Property) Sets an item's max stack size Item Components.
Provide no input to reset the item to its default value. |
| Generated Example | |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/datacomponents/MaxStackSizeAdapter.java#L9 |
| Name | patterns |
| Object | ItemTag |
| Input | ListTag |
| 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. (...)
|
| Description | Changes 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. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemPatterns.java#L146 |
| Name | potion_effects |
| Object | ItemTag |
| Input | ListTag |
| 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. (...)
|
| Description | Sets 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 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) |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemPotion.java#L277 |
| Name | quantity |
| Object | ItemTag |
| Input | ElementTag(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. (...)
|
| Description | Changes the number of items in this stack. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemQuantity.java#L100 |
| Name | rarity |
| Object | ItemTag |
| Input | ElementTag |
| Related Tags | <ItemTag.rarity> (Property) Returns an item's rarity Item Components. (...)
|
| Description | (Property) Sets an item's rarity 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. |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/datacomponents/RarityAdapter.java#L10 |
| Name | raw_nbt |
| Object | ItemTag |
| Input | MapTag |
| 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. (...)
|
| Description | Sets the given map of raw NBT keys onto this item.
Note that the input format must be strictly perfect. Refer to Raw NBT Encoding for explanation of the input format. Deprecated in favor of ItemTag.custom_data on MC 1.20+. |
| Deprecated | use 'ItemTag.custom_data' |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemRawNBT.java#L378 |
| Name | remove_attribute_modifiers |
| Object | ItemTag |
| Input | ListTag |
| 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 | Removes 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 attribute modifiers. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemAttributeModifiers.java#L143 |
| Name | remove_charged_projectiles |
| Object | ItemTag |
| Input | None |
| Related Tags | <ItemTag.charged_projectiles> Returns a list of charged projectile items on this crossbow.
<ItemTag.is_charged> Returns whether this crossbow is charged.
|
| Description | Removes all charged projectiles from this crossbow. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemChargedProjectile.java#L151 |
| Name | remove_component |
| Object | ItemTag |
| Input | ElementTag |
| Description | Removes the specified item component from the item, see Item Components for more information.
This can be used to remove item's default behavior, such as making consumable items non-consumable. See also ItemTag.removed_components. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/properties/ItemRemovedComponents.java#L68 |
| Name | remove_enchantments |
| Object | ItemTag |
| Input | ListTag |
| 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. (...)
|
| Description | Removes the specified enchantments from the item (as a list of EnchantmentTags).
Give no value input to remove all enchantments. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemEnchantments.java#L193 |
| Name | removed_components |
| Object | ItemTag |
| Input | ListTag |
| 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 ItemTag.remove_component to remove a single component. See Item Components for more information. |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/properties/ItemRemovedComponents.java#L14 |
| Name | repair_cost |
| Object | ItemTag |
| Input | ElementTag(Number) |
| Related Tags | <ItemTag.repair_cost> Returns the current repair cost (on an anvil) for this item. (...)
|
| Description | Changes the repair cost (on an anvil) of the item. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemRepairCost.java#L85 |
| Name | sign_contents |
| Object | ItemTag |
| Input | ListTag |
| Related Tags | <ItemTag.sign_contents> Returns a list of lines on a sign item.
|
| Description | Sets the contents of a sign item. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemSignContents.java#L92 |
| Name | skull_skin |
| Object | ItemTag |
| Input | ElementTag(|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. (...)
|
| Description | Sets 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 Player Entity Skins (Skin Blobs). |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemSkullskin.java#L140 |
| Name | spawner_count |
| Object | ItemTag |
| Input | ElementTag(Number) |
| Related Tags | <ItemTag.spawner_count> Returns the spawn count for a spawner block item.
|
| Description | Sets the spawn count of a spawner block item. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemSpawnerCount.java#L83 |
| Name | spawner_delay_data |
| Object | ItemTag |
| Input | ListTag |
| 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.
|
| Description | Sets the current spawn delay, minimum spawn delay, and maximum spawn delay of a mob spawner block item.
For example, -1|200|800 |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemSpawnerDelay.java#L115 |
| Name | spawner_max_nearby_entities |
| Object | ItemTag |
| Input | ElementTag(Number) |
| Related Tags | <ItemTag.spawner_max_nearby_entities> Returns the maximum nearby entities for a spawner block item.
|
| Description | Sets the maximum nearby entities of a spawner block item. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemSpawnerMaxNearbyEntities.java#L83 |
| Name | spawner_player_range |
| Object | ItemTag |
| Input | ElementTag(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).
|
| Description | Sets the maximum player range of a spawner block item. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemSpawnerPlayerRange.java#L83 |
| Name | spawner_range |
| Object | ItemTag |
| Input | ElementTag(Number) |
| Related Tags | <ItemTag.spawner_range> Returns the spawn range for a spawner block item (the radius mobs will spawn in).
|
| Description | Sets the spawn range of a spawner block item (the radius mobs will spawn in). |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemSpawnerRange.java#L83 |
| Name | spawner_type |
| Object | ItemTag |
| Input | EntityTag |
| 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 | |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemSpawnerType.java#L14 |
| Name | trim |
| Object | ItemTag |
| Input | MapTag |
| 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. |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemTrim.java#L16 |
| Name | unbreakable |
| Object | ItemTag |
| Input | ElementTag(Boolean) |
| Related Tags | <ItemTag.unbreakable> Returns whether an item has the unbreakable flag.
|
| Description | Changes whether an item has the unbreakable item flag. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemUnbreakable.java#L70 |
| Name | worth |
| Object | ItemTag |
| Input | ElementTag(Decimal) |
| Related Tags | <ItemTag.essentials_worth> Returns the amount of money one of this item is worth in Essentials.
|
| Description | Deprecated in favor of ItemTag.essentials_worth. |
| Generated Example | |
| Requires | Depenizen, Essentials |
| Deprecated | Use 'ItemTag.essentials_worth' |
| Source | https://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/properties/essentials/EssentialsItemExtensions.java#L65 |
| Name | buried_item |
| Object | LocationTag |
| Input | ItemTag |
| 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.
|
| Description | Sets the buried item in a brushable block (also referred to as "suspicious blocks"). Set to air to have no item buried. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L4436 |
| Name | campfire_items |
| Object | LocationTag |
| Input | ListTag(ItemTag) |
| Related Tags | <LocationTag.campfire_items> Returns a list of items currently in this campfire. (...)
|
| Description | Sets the items in this campfire, as a list of items, where the index in the list directly corresponds to index in the campfire slots. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L5448 |
| Name | item_type |
| Object | NPCTag |
| Input | ItemTag |
| Description | Sets the item type of the item. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/NPCTag.java#L1727 |
| Name | item_on_cursor |
| Object | PlayerTag |
| Input | ItemTag |
| Related Tags | <PlayerTag.item_on_cursor> Returns the item on the player's cursor, if any. This includes (...)
|
| Description | Sets the item on the player's cursor.
This includes chest interfaces, inventories, and hotbars, etc. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L2942 |
| Name | item_slot |
| Object | PlayerTag |
| Input | ElementTag(Number) |
| Related Tags | <PlayerTag.held_item_slot> Returns the slot location of the player's selected item.
|
| Description | Sets the inventory slot that the player has selected.
Works with offline players. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L2895 |
| Name | ItemTag |
| Prefix | i@ |
| Base Type | ElementTag |
| Implements | FlaggableObject, PropertyHolderObject |
| Identity Format | The 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'. |
| Description | An 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. |
| Matchable | ItemTag 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. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/ItemTag.java#L56 |
| Name | <ElementTag.as_item> |
| Returns | ItemTag |
| Description | Deprecated in favor of ObjectTag.as |
| Generated Example | |
| Group | conversion |
| Deprecated | use as[item] |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/bukkit/BukkitElementExtensions.java#L154 |
| Name | <ElementTag.hover_item[<item>]> |
| Returns | ElementTag |
| Description | Adds 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 Denizen Text Formatting. |
| Example | |
| Group | text manipulation |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/bukkit/BukkitElementExtensions.java#L450 |
| Name | <ElementTag.to_itemscript_hash> |
| Returns | ElementTag |
| Description | Shortens 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 | |
| Group | conversion |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/bukkit/BukkitElementExtensions.java#L362 |
| Name | <EnchantmentTag.can_enchant[<item>]> |
| Returns | ElementTag(Boolean) |
| Description | Returns 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 | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EnchantmentTag.java#L352 |
| Name | <EntityTag.can_pickup_items> |
| Returns | ElementTag(Boolean) |
| Mechanism | EntityTag.can_pickup_items |
| Description | Returns whether the entity can pick up items. |
| Generated Example | |
| Group | attributes |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EntityTag.java#L1700 |
| Name | <EntityTag.drops_item> |
| Returns | ElementTag(Boolean) |
| Mechanism | EntityTag.drops_item |
| Description | (Property) Whether an eye of ender drops an item when breaking or shatters.
See EntityTag.item for controlling an eye's item. |
| Generated Example | |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityDropsItem.java#L10 |
| Name | <EntityTag.firework_item> |
| Returns | ItemTag |
| Mechanism | EntityTag.firework_item |
| Description | If the entity is a firework, returns the firework item used to launch it. |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityFirework.java#L62 |
| Name | <EntityTag.framed_item_rotation> |
| Returns | ElementTag |
| Mechanism | EntityTag.framed |
| Description | If the entity is an item frame, returns the rotation of the item currently framed. |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityFramed.java#L87 |
| Name | <EntityTag.framed_item> |
| Returns | ItemTag |
| Mechanism | EntityTag.framed |
| Description | If the entity is an item frame, returns the item currently framed. |
| Generated Example | |
| Group | properties |
| Source | https://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>]> |
| Returns | ElementTag(Boolean) |
| Description | Returns whether the entity has any armor equipment item that matches the given item matcher, using the system behind Advanced Object Matching.
For example, has_equipped[diamond_*] will return true if the entity is wearing at least one piece of diamond armor. |
| Group | element checking |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EntityTag.java#L2659 |
| Name | <EntityTag.has_framed_item> |
| Returns | ElementTag(Boolean) |
| Mechanism | EntityTag.framed |
| Description | If the entity is an item frame, returns whether the frame has an item in it. |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityFramed.java#L113 |
| Name | <EntityTag.item_in_hand> |
| Returns | ItemTag |
| Mechanism | EntityTag.item_in_hand |
| Description | Returns the item the entity is holding, or air if none. |
| Generated Example | |
| Group | inventory |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityItemInHand.java#L69 |
| Name | <EntityTag.item_in_offhand> |
| Returns | ItemTag |
| Mechanism | EntityTag.item_in_offhand |
| Description | Returns the item the entity is holding in their off hand, or air if none. |
| Generated Example | |
| Group | inventory |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityItemInOffHand.java#L69 |
| Name | <EntityTag.item> |
| Returns | ItemTag |
| Mechanism | EntityTag.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 | |
| Group | Properties |
| Source | https://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> |
| Returns | ElementTag(Number) |
| Description | Returns the total count of how many times an item can fit into an inventory. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L1241 |
| Name | <InventoryTag.can_fit[<item>].quantity[<#>]> |
| Returns | ElementTag(Boolean) |
| Description | Returns whether the inventory can fit a certain quantity of an item. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L1260 |
| Name | <InventoryTag.can_fit[<item>|...]> |
| Returns | ElementTag(Boolean) |
| Description | Returns 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. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L1213 |
| Name | <InventoryTag.contains_item[<matcher>].quantity[<#>]> |
| Returns | ElementTag(Boolean) |
| Description | Returns whether the inventory contains a certain number of items that match the specified item matcher.
Uses the system behind Advanced Object Matching. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L1467 |
| Name | <InventoryTag.contains_item[<matcher>]> |
| Returns | ElementTag(Boolean) |
| Description | Returns whether the inventory contains any item that matches the specified item matcher.
Uses the system behind Advanced Object Matching. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L1453 |
| Name | <InventoryTag.exclude_item[<item_matcher>].quantity[<#>]> |
| Returns | InventoryTag |
| Description | Returns the InventoryTag with a certain quantity of matching items excluded. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L1354 |
| Name | <InventoryTag.exclude_item[<item_matcher>]> |
| Returns | InventoryTag |
| Description | Returns a copy of the InventoryTag with all matching items excluded. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L1331 |
| Name | <InventoryTag.find_all_items[<matcher>]> |
| Returns | ListTag |
| Description | Returns 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 Advanced Object Matching. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L1887 |
| Name | <InventoryTag.find_item[<matcher>]> |
| Returns | ElementTag(Number) |
| Description | Returns 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 Advanced Object Matching. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L1863 |
| Name | <InventoryTag.include[<item>].quantity[<#>]> |
| Returns | InventoryTag |
| Description | Returns the InventoryTag with a certain quantity of an item added. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L1309 |
| Name | <InventoryTag.include[<item>|...]> |
| Returns | InventoryTag |
| Description | Returns a copy of the InventoryTag with items added. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L1287 |
| Name | <InventoryTag.quantity_item[(<matcher>)]> |
| Returns | ElementTag(Number) |
| Description | Returns 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 Advanced Object Matching. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L2025 |
| Name | <InventoryTag.stacks[(<item>)]> |
| Returns | ElementTag(Number) |
| Description | Returns the number of itemstacks that match an item if one is specified, or the number of all itemstacks if one is not. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L2081 |
| Name | <ItemTag.all_raw_nbt> |
| Returns | MapTag |
| Mechanism | ItemTag.raw_nbt |
| Description | Returns a map of all raw NBT on this item, including default values.
Refer to format details at Raw NBT Encoding. |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemRawNBT.java#L396 |
| Name | <ItemTag.armor_pose> |
| Returns | MapTag |
| Mechanism | ItemTag.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 | |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemArmorPose.java#L22 |
| Name | <ItemTag.armor_stand_data> |
| Returns | MapTag |
| Mechanism | ItemTag.armor_stand_data |
| Description | Returns a map of basic armor stand data, with keys matching EntityTag property names.
Keys: base_plate, visible, marker, is_small, arms |
| Generated Example | |
| Group | properties |
| Requires | Paper |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/properties/ItemArmorStand.java#L67 |
| Name | <ItemTag.attribute_modifiers> |
| Returns | MapTag |
| Mechanism | ItemTag.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 attribute modifiers. |
| Generated Example | |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemAttributeModifiers.java#L30 |
| Name | <ItemTag.base_color> |
| Returns | ElementTag |
| Mechanism | ItemTag.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 | |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemBaseColor.java#L12 |
| Name | <ItemTag.block_material> |
| Returns | MaterialTag |
| Mechanism | ItemTag.block_material |
| Description | Returns the material for an item with complex-block-data attached. |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemBlockMaterial.java#L48 |
| Name | <ItemTag.book_author> |
| Returns | ElementTag |
| Mechanism | ItemTag.book_author |
| Description | Returns the author of the book. |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemBook.java#L57 |
| Name | <ItemTag.book_generation> |
| Returns | ListTag |
| Mechanism | ItemTag.book_generation |
| Description | Returns the generation of the book (if any), as ORIGINAL, COPY_OF_ORIGINAL, COPY_OF_COPY, or TATTERED. |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemBookGeneration.java#L48 |
| Name | <ItemTag.book_map> |
| Returns | MapTag |
| Mechanism | ItemTag.book |
| Description | Returns a MapTag of data about the book, with keys "pages" (a ListTag), and when available, "author" and "title". |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemBook.java#L100 |
| Name | <ItemTag.book_pages> |
| Returns | ListTag |
| Mechanism | ItemTag.book_pages |
| Description | Returns the plain-text pages of the book as a ListTag. |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemBook.java#L83 |
| Name | <ItemTag.book_title> |
| Returns | ElementTag |
| Mechanism | ItemTag.book_title |
| Description | Returns the title of the book. |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemBook.java#L70 |
| Name | <ItemTag.bukkit_serial> |
| Returns | ElementTag |
| Description | Returns a YAML text section representing the Bukkit serialization of the item, under subkey "item". |
| Generated Example | |
| Group | conversion |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/ItemTag.java#L655 |
| Name | <ItemTag.can_destroy> |
| Returns | ListTag(MaterialTag) |
| Mechanism | ItemTag.can_destroy |
| Description | Returns a list of materials this item can destroy while in adventure mode, if any. |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemCanDestroy.java#L67 |
| Name | <ItemTag.can_place_on> |
| Returns | ListTag(MaterialTag) |
| Mechanism | ItemTag.can_place_on |
| Description | Returns a list of materials this item can be placed on while in adventure mode, if any. |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemCanPlaceOn.java#L67 |
| Name | <ItemTag.charged_projectiles> |
| Returns | ListTag(ItemTag) |
| Mechanism | ItemTag.charged_projectiles |
| Description | Returns a list of charged projectile items on this crossbow. |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemChargedProjectile.java#L50 |
| Name | <ItemTag.color> |
| Returns | ColorTag |
| Mechanism | ItemTag.color |
| Description | (Property) Returns the color of a leather armor, potion, filled map, or tipped arrow item.
For potions, will return a white 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 | |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemColor.java#L15 |
| Name | <ItemTag.components_patch> |
| Returns | MapTag |
| Mechanism | ItemTag.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 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 ItemTag.custom_data. Note that this is just data that isn't already controlled by other ItemTag properties, see ItemTag.full_components_patch for the complete component patch. |
| Generated Example | |
| Group | Properties |
| Warning(s) | Due to this being a direct representation of internal data, compatibility for script usage across versions is not guaranteed. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemComponentsPatch.java#L21 |
| Name | <ItemTag.crackshot_weapon> |
| Returns | ElementTag |
| Description | Returns the CrackShot weapon name for the item. |
| Generated Example | |
| Requires | Depenizen, CrackShot |
| Source | https://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/properties/crackshot/CrackShotItemProperties.java#L55 |
| Name | <ItemTag.custom_data> |
| Returns | MapTag |
| Mechanism | ItemTag.custom_data |
| Description | (Property) Returns an item's custom NBT data, if any.
The map is in NBT format, see 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 | |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemCustomData.java#L13 |
| Name | <ItemTag.custom_model_data> |
| Returns | ElementTag(Number) |
| Mechanism | ItemTag.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 ItemTag.item_model on MC 1.21+. See also ItemTag.has_custom_model_data |
| Generated Example | |
| Group | Properties |
| Source | https://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>]> |
| Returns | MapTag |
| Description | Returns 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 ItemTag.attribute_modifiers Slot must be one of: HAND, OFF_HAND, FEET, LEGS, CHEST, or HEAD |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemAttributeModifiers.java#L101 |
| Name | <ItemTag.display> |
| Returns | ElementTag |
| Mechanism | ItemTag.display |
| Description | Returns the display name of the item, as set by plugin or an anvil. |
| Generated Example | |
| Synonyms (Search Aid) | itemtag.display_name |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemDisplayname.java#L57 |
| Name | <ItemTag.durability> |
| Returns | ElementTag(Number) |
| Mechanism | ItemTag.durability |
| Description | Returns the current durability (number of uses) on the item. |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemDurability.java#L48 |
| Name | <ItemTag.effects_data> |
| Returns | ListTag(MapTag) |
| Mechanism | ItemTag.potion_effects |
| Description | Returns 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 Potion Effect Format. |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemPotion.java#L262 |
| Name | <ItemTag.enchantment_map> |
| Returns | MapTag |
| Mechanism | ItemTag.enchantments |
| Description | Returns a map of enchantments on the item.
Map keys are enchantment names (like "sharpness"), and values are the level (as a number). |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemEnchantments.java#L142 |
| Name | <ItemTag.enchantment_types> |
| Returns | ListTag(EnchantmentTag) |
| Mechanism | ItemTag.enchantments |
| Description | Returns a list of the types of enchantments on the item. |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemEnchantments.java#L106 |
| Name | <ItemTag.enchantments> |
| Returns | ListTag |
| Mechanism | ItemTag.enchantments |
| Description | Deprecated in favor of ItemTag.enchantment_types or ItemTag.enchantment_map |
| Generated Example | |
| Group | properties |
| Deprecated | Use 'enchantment_types' or 'enchantment_map' |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemEnchantments.java#L123 |
| Name | <ItemTag.essentials_worth> |
| Returns | ElementTag(Decimal) |
| Mechanism | ItemTag.essentials_worth |
| Description | Returns the amount of money one of this item is worth in Essentials. |
| Generated Example | |
| Requires | Depenizen, Essentials |
| Source | https://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/properties/essentials/EssentialsItemExtensions.java#L16 |
| Name | <ItemTag.firework_data> |
| Returns | ListTag |
| Mechanism | ItemTag.firework |
| Description | Returns the firework's property value as a ListTag of MapTags, matching the MapTag format of the mechanism. |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemFirework.java#L133 |
| Name | <ItemTag.firework_power> |
| Returns | ElementTag(Number) |
| Mechanism | ItemTag.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 | |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemFireworkPower.java#L10 |
| Name | <ItemTag.firework> |
| Returns | ListTag |
| Mechanism | ItemTag.firework |
| Description | Returns the firework's property value as a list, matching the non-MapTag format of the mechanism.
Consider instead using ItemTag.firework_data |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemFirework.java#L120 |
| Name | <ItemTag.food> |
| Returns | MapTag |
| Mechanism | ItemTag.food |
| Description | (Property) Returns an item's food 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 | |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/datacomponents/FoodAdapter.java#L11 |
| Name | <ItemTag.formatted> |
| Returns | ElementTag |
| Description | Returns 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 | |
| Group | formatting |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/ItemTag.java#L723 |
| Name | <ItemTag.full_components_patch> |
| Returns | MapTag |
| Description | Returns the item's entire internal component patch (see ItemTag.components_patch). |
| Generated Example | |
| Warning(s) | Due to this being a direct representation of internal data, compatibility for script usage across versions is not guaranteed. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemComponentsPatch.java#L107 |
| Name | <ItemTag.glider> |
| Returns | ElementTag(Boolean) |
| Mechanism | ItemTag.glider |
| Description | (Property) Returns whether an item can be used to glide when equipped (like elytras by default), see Item Components. |
| Generated Example | |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/datacomponents/GliderAdapter.java#L7 |
| Name | <ItemTag.has_custom_model_data> |
| Returns | ElementTag(Boolean) |
| Mechanism | ItemTag.custom_model_data |
| Description | Returns whether the item has a custom model data ID number set on it.
Prefer ItemTag.item_model on MC 1.21+. See also ItemTag.custom_model_data. |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemCustomModel.java#L53 |
| Name | <ItemTag.has_display> |
| Returns | ElementTag(Boolean) |
| Mechanism | ItemTag.display |
| Description | Returns whether the item has a custom set display name. |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemDisplayname.java#L73 |
| Name | <ItemTag.has_inventory> |
| Returns | ElementTag(Boolean) |
| Description | Returns whether the item has an inventory.
If this returns true, it will enable access to: ItemTag.inventory_contents, and ItemTag.inventory_contents. |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/ItemTag.java#L563 |
| Name | <ItemTag.has_lore> |
| Returns | ElementTag(Boolean) |
| Mechanism | ItemTag.lore |
| Description | Returns whether the item has lore set on it. |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemLore.java#L71 |
| Name | <ItemTag.has_potion_effect> |
| Returns | ElementTag(Boolean) |
| Mechanism | ItemTag.potion_effects |
| Description | Returns whether the item (potion, tipped arrow, or suspicious stew) has a potion effect. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemPotion.java#L307 |
| Name | <ItemTag.has_skin> |
| Returns | ElementTag(Boolean) |
| Mechanism | ItemTag.skull_skin |
| Description | Returns whether the item has a custom skin set.
(Only for 'player_head's) |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemSkullskin.java#L102 |
| Name | <ItemTag.hides> |
| Returns | ListTag |
| Mechanism | ItemTag.hides |
| Description | Returns 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 | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemHidden.java#L79 |
| Name | <ItemTag.instrument> |
| Returns | ElementTag |
| Mechanism | ItemTag.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 | |
| Example | |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemInstrument.java#L12 |
| Name | <ItemTag.inventory_contents> |
| Returns | ListTag(ItemTag) |
| Mechanism | ItemTag.inventory_contents |
| Description | (Property) A container item's inventory contents. |
| Generated Example | |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemInventoryContents.java#L28 |
| Name | <ItemTag.invisible> |
| Returns | ElementTag(Boolean) |
| Mechanism | ItemTag.invisible |
| Description | Returns whether an Item_Frame item will be invisible when placed. |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemFrameInvisible.java#L58 |
| Name | <ItemTag.is_book> |
| Returns | ElementTag(Boolean) |
| Description | Returns whether the item is considered an editable book.
If this returns true, it will enable access to: ItemTag.book, ItemTag.book_author, ItemTag.book_title, and ItemTag.book_pages. |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/ItemTag.java#L519 |
| Name | <ItemTag.is_charged> |
| Returns | ElementTag(Boolean) |
| Mechanism | ItemTag.charged_projectiles |
| Description | Returns whether this crossbow is charged. |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemChargedProjectile.java#L63 |
| Name | <ItemTag.is_colorable> |
| Returns | ElementTag(Boolean) |
| Description | Returns whether the item can have a custom color.
If this returns true, it will enable access to: ItemTag.color, and ItemTag.color. |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/ItemTag.java#L533 |
| Name | <ItemTag.is_enchanted> |
| Returns | ElementTag(Boolean) |
| Mechanism | ItemTag.enchantments |
| Description | Returns whether the item has any enchantments. |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemEnchantments.java#L59 |
| Name | <ItemTag.is_firework> |
| Returns | ElementTag(Boolean) |
| Description | Returns whether the item is a firework.
If this returns true, it will enable access to: ItemTag.firework, and ItemTag.firework. |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/ItemTag.java#L550 |
| Name | <ItemTag.is_lockable> |
| Returns | ElementTag(Boolean) |
| Description | Returns whether the item is lockable.
If this returns true, it will enable access to: ItemTag.lock, and ItemTag.lock. |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/ItemTag.java#L576 |
| Name | <ItemTag.is_locked> |
| Returns | ElementTag(Boolean) |
| Mechanism | ItemTag.lock |
| Description | Returns whether this item has a lock password. |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemLock.java#L74 |
| Name | <ItemTag.is_overridden[<component>]> |
| Returns | ElementTag(Boolean) |
| Description | Returns whether an item has a specific item component type overridden, see Item Components. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/datacomponents/DataComponentAdapter.java#L80 |
| Name | <ItemTag.is_waxed> |
| Returns | ElementTag(Boolean) |
| Mechanism | ItemTag.is_waxed |
| Description | (Property) Returns whether a sign item is waxed (cannot be edited once placed). |
| Generated Example | |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemSignIsWaxed.java#L13 |
| Name | <ItemTag.item_model> |
| Returns | ElementTag |
| Mechanism | ItemTag.item_model |
| Description | (Property) Returns an item's model 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 | |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/datacomponents/ItemModelAdapter.java#L11 |
| Name | <ItemTag.json> |
| Returns | ElementTag |
| Description | Returns the item converted to a raw JSON object with one layer of escaping for network transmission.
EG, via /tellraw. Generally, prefer tags like ElementTag.on_hover.type with type 'show_item'. |
| Generated Example | |
| Group | conversion |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/ItemTag.java#L630 |
| Name | <ItemTag.knowledge_book_recipes> |
| Returns | ListTag |
| Mechanism | ItemTag.knowledge_book_recipes |
| Description | Returns 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 | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemKnowledgeBookRecipes.java#L63 |
| Name | <ItemTag.lock> |
| Returns | ElementTag |
| Mechanism | ItemTag.lock |
| Description | Returns the lock password of this item. |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemLock.java#L59 |
| Name | <ItemTag.lodestone_location> |
| Returns | LocationTag |
| Mechanism | ItemTag.lodestone_location |
| Description | Returns the lodestone location this compass is pointing at (if any).
See also ItemTag.lodestone_tracked |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemLodestoneLocation.java#L50 |
| Name | <ItemTag.lodestone_tracked> |
| Returns | ElementTag(Boolean) |
| Mechanism | ItemTag.lodestone_tracked |
| Description | Returns 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 ItemTag.lodestone_location |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemLodestoneTracked.java#L49 |
| Name | <ItemTag.lore> |
| Returns | ListTag |
| Mechanism | ItemTag.lore |
| Description | Returns lore as a ListTag. |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemLore.java#L57 |
| Name | <ItemTag.map_center> |
| Returns | LocationTag |
| Mechanism | ItemTag.map_center |
| Description | Returns 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 | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemMap.java#L99 |
| Name | <ItemTag.map_locked> |
| Returns | ElementTag(Boolean) |
| Mechanism | ItemTag.map_locked |
| Description | Returns whether maps with the same ID as this map are locked. |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemMap.java#L80 |
| Name | <ItemTag.map_scale> |
| Returns | ElementTag(Number) |
| Mechanism | ItemTag.map |
| Description | Returns the scale of the map, from 0 (smallest) to 4 (largest). |
| Generated Example | |
| Group | properties |
| Source | https://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>]> |
| Returns | ImageTag |
| Description | Returns 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 | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/ItemTag.java#L752 |
| Name | <ItemTag.map> |
| Returns | ElementTag(Number) |
| Mechanism | ItemTag.map |
| Description | Returns the ID number of the map item's map. |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemMap.java#L46 |
| Name | <ItemTag.material> |
| Returns | MaterialTag |
| Mechanism | ItemTag.material |
| Description | Returns 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 | |
| Group | conversion |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/ItemTag.java#L589 |
| Name | <ItemTag.max_durability> |
| Returns | ElementTag(Number) |
| Mechanism | ItemTag.max_durability |
| Description | (Property) Returns an item's max durability Item Components. |
| Generated Example | |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/datacomponents/MaxDurabilityAdapter.java#L9 |
| Name | <ItemTag.max_stack_size> |
| Returns | ElementTag(Number) |
| Mechanism | ItemTag.max_stack_size |
| Description | (Property) Returns an item's max stack size Item Components. |
| Generated Example | |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/datacomponents/MaxStackSizeAdapter.java#L9 |
| Name | <ItemTag.max_stack> |
| Returns | ElementTag(Number) |
| Description | Returns the max number of this item possible in a single stack of this type.
For use with ItemTag.quantity and ItemTag.quantity. |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemQuantity.java#L66 |
| Name | <ItemTag.meta_type> |
| Returns | ElementTag |
| Description | Returns the name of the Bukkit item meta type that applies to this item.
This is for debugging purposes. |
| Generated Example | |
| Group | conversion |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/ItemTag.java#L643 |
| Name | <ItemTag.patterns> |
| Returns | ListTag |
| Mechanism | ItemTag.patterns |
| Description | Lists 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 | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemPatterns.java#L112 |
| Name | <ItemTag.placed_material> |
| Returns | MaterialTag |
| Description | Returns 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 | |
| Group | conversion |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/ItemTag.java#L613 |
| Name | <ItemTag.potion_base_type> |
| Returns | ElementTag |
| Mechanism | ItemTag.potion_effects |
| Description | Deprecated in favor of ItemTag.effects_data |
| Generated Example | |
| Group | properties |
| Deprecated | use 'effects_data.first.get[base_type]' instead |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemPotion.java#L324 |
| Name | <ItemTag.potion_base> |
| Returns | ElementTag |
| Mechanism | ItemTag.potion_effects |
| Description | Deprecated in favor of ItemTag.effects_data |
| Generated Example | |
| Group | attribute |
| Deprecated | use 'effects_data' instead |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemPotion.java#L342 |
| Name | <ItemTag.potion_effect[<#>]> |
| Returns | ElementTag |
| Mechanism | ItemTag.potion_effects |
| Description | Deprecated in favor of ItemTag.effects_data |
| Generated Example | |
| Group | attribute |
| Deprecated | use 'effects_data' instead |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemPotion.java#L380 |
| Name | <ItemTag.potion_effects> |
| Returns | ListTag |
| Mechanism | ItemTag.potion_effects |
| Description | Deprecated in favor of ItemTag.effects_data |
| Generated Example | |
| Group | attribute |
| Deprecated | use 'effects_data' instead |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemPotion.java#L363 |
| Name | <ItemTag.quantity> |
| Returns | ElementTag(Number) |
| Mechanism | ItemTag.quantity |
| Description | Returns the number of items in the ItemTag's itemstack. |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemQuantity.java#L48 |
| Name | <ItemTag.rarity> |
| Returns | ElementTag |
| Mechanism | ItemTag.rarity |
| Description | (Property) Returns an item's rarity Item Components.
See https://jd.papermc.io/paper/org/bukkit/inventory/ItemRarity.html for valid rarity values. |
| Generated Example | |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/datacomponents/RarityAdapter.java#L10 |
| Name | <ItemTag.raw_nbt> |
| Returns | MapTag |
| Mechanism | ItemTag.raw_nbt |
| Description | Returns a map of all non-default raw NBT on this item.
Refer to format details at Raw NBT Encoding. Deprecated in favor of ItemTag.custom_data on MC 1.20+. |
| Generated Example | |
| Deprecated | use 'ItemTag.custom_data' |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemRawNBT.java#L360 |
| Name | <ItemTag.recipe_ids[(<type>)]> |
| Returns | ListTag |
| Description | If 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 | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/ItemTag.java#L679 |
| Name | <ItemTag.removed_components> |
| Returns | ListTag |
| Mechanism | ItemTag.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 ItemTag.remove_component to remove a single component. See Item Components for more information. |
| Generated Example | |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/properties/ItemRemovedComponents.java#L14 |
| Name | <ItemTag.repair_cost> |
| Returns | ElementTag(Number) |
| Mechanism | ItemTag.repair_cost |
| Description | Returns the current repair cost (on an anvil) for this item.
Note that zero indicates no repair cost. |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemRepairCost.java#L49 |
| Name | <ItemTag.repairable> |
| Returns | ElementTag(Boolean) |
| Description | Returns whether the item can be repaired.
If this returns true, it will enable access to: ItemTag.durability, ItemTag.max_durability, and 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 | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/ItemTag.java#L504 |
| Name | <ItemTag.script> |
| Returns | ScriptTag |
| Description | Returns the script of the item if it was created by an item script. |
| Generated Example | |
| Group | scripts |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemScript.java#L74 |
| Name | <ItemTag.scriptname> |
| Returns | ElementTag |
| Description | Use ".script.name" instead.
This deprecated tag may be useful for debugging items when item scripts may have been deleted. |
| Generated Example | |
| Group | data |
| Deprecated | use ".script.name" instead. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemScript.java#L57 |
| Name | <ItemTag.sign_contents> |
| Returns | ListTag |
| Mechanism | ItemTag.sign_contents |
| Description | Returns a list of lines on a sign item. |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemSignContents.java#L59 |
| Name | <ItemTag.simple> |
| Returns | ElementTag |
| Description | Returns a simple reusable item identification for this item, with minimal extra data. |
| Generated Example | |
| Group | conversion |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/ItemTag.java#L668 |
| Name | <ItemTag.skin> |
| Returns | ElementTag |
| Mechanism | ItemTag.skull_skin |
| Description | Returns 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 Player Entity Skins (Skin Blobs). |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemSkullskin.java#L75 |
| Name | <ItemTag.skull_skin> |
| Returns | ElementTag |
| Mechanism | ItemTag.skull_skin |
| Description | Returns 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 Player Entity Skins (Skin Blobs). |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemSkullskin.java#L56 |
| Name | <ItemTag.spawner_count> |
| Returns | ElementTag(Number) |
| Mechanism | ItemTag.spawner_count |
| Description | Returns the spawn count for a spawner block item. |
| Generated Example | |
| Group | properties |
| Source | https://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> |
| Returns | ElementTag(Number) |
| Mechanism | ItemTag.spawner_max_nearby_entities |
| Description | Returns the maximum nearby entities for a spawner block item. |
| Generated Example | |
| Group | properties |
| Source | https://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> |
| Returns | ElementTag(Number) |
| Mechanism | ItemTag.spawner_delay_data |
| Description | Returns the maximum spawn delay for a spawner block item. |
| Generated Example | |
| Group | properties |
| Source | https://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> |
| Returns | ElementTag(Number) |
| Mechanism | ItemTag.spawner_delay_data |
| Description | Returns the minimum spawn delay for a spawner block item. |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemSpawnerDelay.java#L67 |
| Name | <ItemTag.spawner_player_range> |
| Returns | ElementTag(Number) |
| Mechanism | ItemTag.spawner_player_range |
| Description | Returns the maximum player range for a spawner block item (ie how close a player must be for this spawner to be active). |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemSpawnerPlayerRange.java#L50 |
| Name | <ItemTag.spawner_range> |
| Returns | ElementTag(Number) |
| Mechanism | ItemTag.spawner_range |
| Description | Returns the spawn range for a spawner block item (the radius mobs will spawn in). |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemSpawnerRange.java#L50 |
| Name | <ItemTag.spawner_spawn_delay> |
| Returns | ElementTag(Number) |
| Mechanism | ItemTag.spawner_delay_data |
| Description | Returns the current spawn delay for a spawner block item.
This changes over time between ItemTag.spawner_minimum_spawn_delay and ItemTag.spawner_maximum_spawn_delay. |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemSpawnerDelay.java#L51 |
| Name | <ItemTag.spawner_type> |
| Returns | EntityTag |
| Mechanism | ItemTag.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 | |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemSpawnerType.java#L14 |
| Name | <ItemTag.trim> |
| Returns | MapTag |
| Mechanism | ItemTag.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 | |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemTrim.java#L16 |
| Name | <ItemTag.unbreakable> |
| Returns | ElementTag(Boolean) |
| Mechanism | ItemTag.unbreakable |
| Description | Returns whether an item has the unbreakable flag. |
| Generated Example | |
| Group | properties |
| Source | https://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>]> |
| Returns | ItemTag |
| Mechanism | ItemTag.flag |
| Description | Returns 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]> |
| Group | properties |
| Source | https://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>]> |
| Returns | ItemTag |
| Mechanism | ItemTag.flag |
| Description | Returns 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]>]> |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemFlags.java#L53 |
| Name | <ItemTag.worth.quantity[<#>]> |
| Returns | ElementTag(Decimal) |
| Description | Deprecated in favor of ItemTag.essentials_worth. |
| Requires | Depenizen, Essentials |
| Deprecated | Use 'ItemTag.essentials_worth.mul[<#>]' |
| Source | https://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/properties/essentials/EssentialsItemExtensions.java#L50 |
| Name | <ItemTag.worth> |
| Returns | ElementTag(Decimal) |
| Mechanism | ItemTag.essentials_worth |
| Description | Deprecated in favor of ItemTag.essentials_worth. |
| Generated Example | |
| Requires | Depenizen, Essentials |
| Deprecated | Use 'ItemTag.essentials_worth' |
| Source | https://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>]> |
| Returns | ListTag |
| Description | Returns 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 | |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L862 |
| Name | <ListTag.get_sub_items[<#>]> |
| Returns | ListTag |
| Description | Returns a list of the specified sub items in the list, as split by the
forward-slash character (/). |
| Example | |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L846 |
| Name | <LocationTag.buried_item> |
| Returns | ItemTag |
| Mechanism | LocationTag.buried_item |
| Description | Returns the item buried in a brushable block (also referred to as "suspicious blocks"). Returns air if there is no item buried. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L4422 |
| Name | <LocationTag.campfire_items> |
| Returns | ListTag(ItemTag) |
| Mechanism | LocationTag.campfire_items |
| Description | Returns 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 | |
| Group | world |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L4113 |
| Name | <LocationTag.drops[(<item>)]> |
| Returns | ListTag(ItemTag) |
| Description | Returns 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 | |
| Group | world |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L1443 |
| Name | <LocationTag.xp_drop[(<item>)]> |
| Returns | ElementTag(Number) |
| Description | Returns 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 | |
| Group | world |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L1464 |
| Name | <MaterialTag.is_item> |
| Returns | ElementTag(Boolean) |
| Description | Returns 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 | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/MaterialTag.java#L352 |
| Name | <MaterialTag.item> |
| Returns | ItemTag |
| Description | Returns an item of the material. Not all materials can be items. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/MaterialTag.java#L544 |
| Name | <mythic_item[<name>]> |
| Returns | ItemTag |
| Description | Returns an ItemTag of the named mythic item. |
| Requires | Depenizen, MythicMobs |
| Source | https://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/bridges/MythicMobsBridge.java#L94 |
| Name | <PlayerTag.held_item_slot> |
| Returns | ElementTag(Number) |
| Description | Returns the slot location of the player's selected item. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L1604 |
| Name | <PlayerTag.item_cooldown[<material>]> |
| Returns | DurationTag |
| Description | Returns the cooldown duration remaining on player's material. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L869 |
| Name | <PlayerTag.item_on_cursor> |
| Returns | ItemTag |
| Mechanism | PlayerTag.item_on_cursor |
| Description | Returns the item on the player's cursor, if any. This includes
chest interfaces, inventories, and hotbars, etc. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L1592 |
| Name | <PlayerTag.skull_item> |
| Returns | ItemTag |
| Description | Returns a Player_Head item with the skin of the player.
See also Player Entity Skins (Skin Blobs). |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L1733 |
| Name | <PlayerTag.we_brush_info[(<item>)]> |
| Returns | ListTag |
| Description | Returns 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 | |
| Requires | Depenizen, WorldEdit |
| Source | https://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/properties/worldedit/WorldEditPlayerProperties.java#L81 |
| Name | <server.parse_bukkit_item[<serial>]> |
| Returns | ItemTag |
| Description | Returns the ItemTag resultant from parsing Bukkit item serialization data (under subkey "item"). |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L176 |
| Name | <server.recipe_items[<id>]> |
| Returns | ListTag(ItemTag) |
| Description | Returns 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'. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L227 |
| Name | <FlaggableObject.flag_expiration[<flag_name>]> |
| Returns | TimeTag |
| Description | Returns a TimeTag indicating when the specified flag will expire.
See flag system. |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/flags/AbstractFlagTracker.java#L71 |
| Name | <FlaggableObject.flag_map[<name>|...]> |
| Returns | MapTag |
| Description | Returns 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 flag system. |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/flags/AbstractFlagTracker.java#L104 |
| Name | <FlaggableObject.flag[<flag_name>]> |
| Returns | ObjectTag |
| Description | Returns the specified flag from the flaggable object.
If the flag is expired, will return null. Consider also using FlaggableObject.has_flag. See flag system. |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/flags/AbstractFlagTracker.java#L37 |
| Name | <FlaggableObject.has_flag[<flag_name>]> |
| Returns | ElementTag(Boolean) |
| Description | Returns true if the flaggable object has the specified flag, otherwise returns false.
See flag system. |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/flags/AbstractFlagTracker.java#L55 |
| Name | <FlaggableObject.list_flags> |
| Returns | ListTag |
| Description | Returns 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 flag system. |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/flags/AbstractFlagTracker.java#L87 |
| Name | <PropertyHolderObject.property_map> |
| Returns | MapTag |
| Description | Returns the object's property map. |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/properties/PropertyParser.java#L560 |
| Name | <PropertyHolderObject.supports[<property-name>]> |
| Returns | ElementTag(Boolean) |
| Description | Returns 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. |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/properties/PropertyParser.java#L536 |
| Name | <PropertyHolderObject.with_map[<property-map>]> |
| Returns | PropertyHolderObject |
| Description | Returns a copy of the object with the MapTag of mechanism adjustments applied. |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/properties/PropertyParser.java#L513 |
| Name | <PropertyHolderObject.with_single[<mechanism>=<value>]> |
| Returns | PropertyHolderObject |
| Description | Returns a copy of the object with a single mechanism adjustment applied.
This avoids the risk of escaping issues. |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/properties/PropertyParser.java#L490 |
| Name | <PropertyHolderObject.with[<mechanism>=<value>;...]> |
| Returns | PropertyHolderObject |
| Description | Returns a copy of the object with mechanism adjustments applied.
Be careful with dynamic inputs, they may break from escaping flaws. Consider using PropertyHolderObject.with_single instead. |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/properties/PropertyParser.java#L463 |
| Name | Give |
| Syntax | give [<item>|...] (quantity:<#>) (unlimit_stack_size) (to:<inventory>) (slot:<slot>) (allowed_slots:<slot-matcher>) (ignore_leftovers) |
| Short Description | Gives the player an item or xp. |
| Full Description | Gives 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 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 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 experience. To give money to a player, use 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 | |
| Usage Example | |
| Usage Example | |
| Group | item |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/item/GiveCommand.java#L31 |
| Name | Inventory |
| Syntax | inventory [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 Description | Edits the inventory of a player, NPC, or chest. |
| Full Description | Use 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 adjust to adjust an inventory mechanism. The "flag" option sets a flag on items, similar to flag. See also 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 give, and to remove items from an inventory, you should usually use take. The slot argument can be any valid slot, see 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 | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Group | item |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/item/InventoryCommand.java#L105 |
| Name | Map |
| Syntax | map [<#>/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 Description | Modifies a new or existing map by adding images or text. |
| Full Description | This 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 | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Group | item |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/item/MapCommand.java#L30 |
| Name | Take |
| Syntax | take [iteminhand/cursoritem/bydisplay:<name>/bycover:<title>|<author>/slot:<slot>/flagged:<flag>/item:<matcher>] (quantity:<#>) (from:<inventory>) |
| Short Description | Takes an item from the player. |
| Full Description | Takes 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 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 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 experience. To take money from a player, use money. |
| Related Tags | <PlayerTag.item_in_hand> Returns the item the entity is holding, or air if none.
|
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Group | item |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/item/TakeCommand.java#L41 |
| Name | Drop |
| Syntax | drop [<entity_type>/xp/<item>|...] (<location>) (quantity:<#>) (speed:<#.#>) (delay:<duration>) |
| Short Description | Drops an item, entity, or experience orb on a location. |
| Full Description | To 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 | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Group | world |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/world/DropCommand.java#L34 |
| Name | Equip |
| Syntax | equip (<entity>|...) (hand:<item>) (offhand:<item>) (head:<item>) (chest:<item>) (legs:<item>) (boots:<item>) (saddle:<item>) (body:<item>) |
| Short Description | Equips items and armor on a list of entities. |
| Full Description | This 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 EntityTag.equipment_map.
<InventoryTag.equipment> Returns the equipment of an inventory as a list of items. (...)
|
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Group | entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/EquipCommand.java#L34 |
| Name | FakeEquip |
| Syntax | fakeequip [<entity>|...] (for:<player>|...) (duration:<duration>/reset) (hand:<item>) (offhand:<item>) (head:<item>) (chest:<item>) (legs:<item>) (boots:<item>) |
| Short Description | Fake-equips items and armor on a list of entities for players to see without real change. |
| Full Description | This 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 EntityTag.equipment_map.
<InventoryTag.equipment> Returns the equipment of an inventory as a list of items. (...)
|
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Group | entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/FakeEquipCommand.java#L34 |
| Name | Foreach |
| Related Guide Page | https://guide.denizenscript.com/guides/basics/loops.html |
| Syntax | foreach [stop/next/<object>|...] (as:<name>) (key:<name>) [<commands>] |
| Short Description | Loops through a ListTag, running a set of commands for each item. |
| Full Description | Loops 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 wait or ~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 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 | |
| Usage Example | |
| Usage Example | |
| Group | queue |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/queue/ForeachCommand.java#L31 |
| Name | entity breaks hanging because cause |
| Event Lines | <entity> breaks <hanging> (because <cause>) |
| Triggers | when a hanging entity (painting, item_frame, or leash_hitch) is broken. |
| Generated Examples | on animal breaks hanging because cause:
on illusioner breaks hanging because cause: |
| Has Player | when the breaker is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Has NPC | when the breaker is an npc. |
| Contexts | <context.cause> returns the cause of the entity breaking. Causes list: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/hanging/HangingBreakEvent.RemoveCause.html
<context.breaker> returns the EntityTag that broke the hanging entity, if any.
<context.hanging> returns the EntityTag of the hanging.
|
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityBreaksHangingScriptEvent.java#L19 |
| Name | hanging breaks because cause |
| Event Lines | <hanging> breaks (because <cause>) |
| Triggers | when a hanging entity (painting, item_frame, or leash_hitch) is broken. |
| Generated Examples | after 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.
|
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/HangingBreaksScriptEvent.java#L16 |
| Name | loot dispenses from block |
| Event Lines | loot dispenses from <block> |
| Triggers | when a block dispenses loot containing multiple items. |
| Generated Examples | on loot dispenses from cut_copper:
after loot dispenses from cherry_stairs: |
| Has Player | when 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. |
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Block |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/block/LootDispensesFromBlockScriptEvent.java#L19 |
| Name | player discovers recipe |
| Event Lines | player discovers recipe |
| Triggers | when a player discovers a new item in the recipe book. |
| Generated Examples | on player discovers recipe: |
| Has Player | Always. - 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.
|
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Player |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerRecipeDiscoverScriptEvent.java#L14 |
| Name | player inventory slot changes |
| Event Lines | player inventory slot changes |
| Triggers | when 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 Examples | after player inventory slot changes: |
| Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Switches | from:<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 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 Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Paper |
| Requires | Paper |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/events/PlayerInventorySlotChangeScriptEvent.java#L16 |
| Name | player places hanging |
| Event Lines | player places <hanging> |
| Triggers | when a hanging entity (painting or itemframe) is placed. |
| Generated Examples | after player places hanging: |
| Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Switches | item:<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.
|
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Player |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerPlacesHangingScriptEvent.java#L17 |
| Name | Adjust |
| Related Guide Page | https://guide.denizenscript.com/guides/basics/mechanisms.html |
| Syntax | adjust [<ObjectTag>/def:<name>|...] [<mechanism>](:<value>) |
| Short Description | Adjusts an object's mechanism. |
| Full Description | Many 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 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 | |
| Usage Example | |
| Usage Example | |
| Synonyms (Search Aid) | mechanism |
| Group | core |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/core/AdjustCommand.java#L31 |
| Name | Animate |
| Syntax | animate [<entity>|...] [animation:<name>] (for:<player>|...) |
| Short Description | Makes a list of entities perform a certain animation. |
| Full Description | Minecraft 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 EntityTag.play_hurt_animation |
| Related Tags | None
|
| Usage Example | |
| Usage Example | |
| Group | entity |
| Requires | Citizens |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/AnimateCommand.java#L29 |
| Name | Compass |
| Syntax | compass [<location>/reset] |
| Short Description | Redirects the player's compass to target the given location. |
| Full Description | Redirects 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 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 | |
| Usage Example | |
| Usage Example | |
| Group | player |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/player/CompassCommand.java#L23 |
| Name | Fish |
| Syntax | fish [<location>/stop] (catch:{none}/default/junk/treasure/fish) (chance:<#>) |
| Short Description | Causes an NPC to begin fishing around a specified location. |
| Full Description | Causes 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 Tags | None
|
| Usage Example | |
| Usage Example | |
| Group | npc |
| Requires | Citizens |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/npc/FishCommand.java#L27 |
| Name | libsdisguise |
| Syntax | libsdisguise [remove/player/mob/misc] (type:<entity type>) (target:<entity>) (name:<text>) (display_name:<text>) (baby) (id:<item>) (self) (hide_name) |
| Short Description | Disguises an entity as a different entity. |
| Full Description | Disguises 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 | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Group | Depenizen |
| Requires | Depenizen, LibsDisguises |
| Source | https://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/commands/libsdisguises/LibsDisguiseCommand.java#L25 |
| Name | ModifyBlock |
| Syntax | modifyblock [<location>|.../<ellipsoid>/<cuboid>] [<material>|...] (no_physics/naturally:<tool>) (delayed) (<script>) (<percent chance>|...) (source:<player>) (max_delay_ms:<#>) |
| Short Description | Modifies blocks. |
| Full Description | Changes 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 ~waitable. |
| Related Tags | <LocationTag.material> Returns the material of the block at the location.
|
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Synonyms (Search Aid) | setblock, changeblock, placeblock, breakblock |
| Group | world |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/world/ModifyBlockCommand.java#L62 |
| Name | PlayEffect |
| Syntax | playeffect [effect:<name>] [at:<location>|...] (data:<#.#>) (special_data:<map>) (visibility:<#.#>) (quantity:<#>) (offset:<#.#>,<#.#>,<#.#>) (targets:<player>|...) (velocity:<vector>) |
| Short Description | Plays a visible or audible effect at the location. |
| Full Description | Allows 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 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 | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Synonyms (Search Aid) | particle |
| Group | world |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/world/PlayEffectCommand.java#L55 |
| Name | Schematic |
| Syntax | schematic [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 Description | Creates, loads, pastes, and saves schematics (Sets of blocks). |
| Full Description | Creates, 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 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 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 ~waitable. To delete a schematic file, use 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 | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Group | world |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/world/SchematicCommand.java#L58 |
| Name | Sidebar |
| Syntax | sidebar (add/remove/{set}/set_line) (title:<title>) (scores:<#>|...) (values:<line>|...) (start:<#>/{num_of_lines}) (increment:<#>/{-1}) (players:<player>|...) (per_player) |
| Short Description | Controls clientside-only sidebars. |
| Full Description | This 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 sidebar.
<PlayerTag.sidebar_title> Returns the current title set on the player's Sidebar via sidebar.
<PlayerTag.sidebar_scores> Returns the current scores set on the player's Sidebar via sidebar, (...)
|
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Group | player |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/player/SidebarCommand.java#L37 |
| Name | block shears entity |
| Event Lines | <block> shears <entity> |
| Triggers | when a dispenser shears a nearby sheep. |
| Generated Examples | on block shears animal:
after block shears vehicle: |
| Contexts | <context.location> returns the LocationTag of the dispenser.
<context.tool> returns the ItemTag of the item used to shear the entity.
<context.entity> returns the EntityTag of the sheared entity.
|
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Block |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/block/BlockShearEntityScriptEvent.java#L14 |
| Name | entity breeds |
| Event Lines | <entity> breeds |
| Triggers | when two entities breed. |
| Generated Examples | after living breeds:
on entity breeds: |
| Contexts | <context.breeder> returns the EntityTag responsible for breeding, if it exists.
<context.child> returns the child EntityTag.
<context.mother> returns the parent EntityTag creating the child. The child will spawn at the mother's location.
<context.father> returns the other parent EntityTag.
<context.item> returns the ItemTag used to initiate breeding, if it exists.
<context.experience> returns the amount of experience granted by breeding.
|
| Determine | ElementTag(Number) to set the amount of experience granted by breeding. |
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityBreedScriptEvent.java#L15 |
| Name | entity changes food level |
| Event Lines | <entity> changes food level |
| Triggers | when an entity's food level changes. |
| Generated Examples | on entity changes food level:
on mob changes food level: |
| Has Player | when the entity that's food level has changed is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Has NPC | when the entity that's food level has changed is an NPC. |
| Switches | item:<item> to only process the event if it was triggered by an item that matches the specified item. |
| Contexts | <context.entity> returns the EntityTag.
<context.food> returns an ElementTag(Number) of the entity's new food level.
<context.item> returns an ItemTag of the item that triggered the event, if any.
|
| Determine | ElementTag(Number) to set the entity's new food level. |
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Synonyms (Search Aid) | player hunger depletes |
| Group | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityFoodLevelChangeScriptEvent.java#L16 |
| Name | entity dies|death |
| Event Lines | <entity> dies|death |
| Triggers | when an entity dies. Note that this fires *after* the entity dies, and thus some data may be lost from the entity.
The death can only be cancelled on Paper. |
| Generated Examples | after entity death:
after command_block_minecart death: |
| Has Player | when the entity that died is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Has NPC | when the entity that died is an NPC. |
| Switches | by:<entity> to only process the event if the killer is known and matches the specified entity matcher.
cause:<cause> to only process the event if it was caused by a specific damage cause. |
| Contexts | <context.entity> returns the EntityTag that died.
<context.damager> returns the EntityTag damaging the other entity, if any.
<context.projectile> returns the EntityTag of a projectile used to kill the entity, if one was used.
<context.message> returns an ElementTag of a player's death message.
<context.cause> returns an ElementTag of the cause of the death. See damage cause for a list of possible damage causes.
<context.drops> returns a ListTag of all pending item drops.
<context.xp> returns an ElementTag of the amount of experience to be dropped.
<context.keep_inventory> returns true if the player dying is set to keep their inventory, false if not, or null if the dying entity is not a player.
|
| Determine | ElementTag to change the death message.
"NO_DROPS" to specify that any drops should be removed. "NO_XP" to specify that any XP orbs should be removed. ListTag(ItemTag) to specify new items to be dropped. ElementTag(Number) to specify the new amount of XP to be dropped. "KEEP_INV" to specify (if a player death) that the inventory should be kept. "KEEP_LEVEL" to specify (if a player death) that the XP level should be kept. "NO_MESSAGE" to hide a player death message. |
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityDeathScriptEvent.java#L27 |
| Name | entity loads crossbow |
| Event Lines | <entity> loads crossbow |
| Triggers | when a living entity loads a crossbow with a projectile. |
| Generated Examples | after entity loads crossbow:
on tropical_fish loads crossbow: |
| Has Player | when the entity is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Has NPC | when the entity is an NPC. |
| Switches | crossbow:<item> to only process the event if the crossbow is a specified item. |
| Contexts | <context.entity> returns the EntityTag that is loading the crossbow.
<context.crossbow> returns the ItemTag of the crossbow.
<context.consumes> returns true if the loading will consume a projectile item, otherwise false.
<context.hand> returns "HAND" or "OFF_HAND" depending on which hand is holding the crossbow item.
|
| Determine | "KEEP_ITEM" to keep the projectile item in the shooter's inventory. |
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Paper |
| Requires | Paper |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/events/EntityLoadCrossbowScriptEvent.java#L16 |
| Name | brewing stand brews |
| Event Lines | brewing stand brews |
| Triggers | when a brewing stand brews a potion. |
| Generated Examples | on 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. |
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Block |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/block/BrewsScriptEvent.java#L16 |
| Name | brewing starts |
| Event Lines | brewing starts |
| Triggers | when a brewing stand starts brewing a potion. |
| Generated Examples | on 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 Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Block |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/block/BrewingStartsScriptEvent.java#L14 |
| Name | chestshop transaction |
| Event Lines | chestshop transaction |
| Triggers | when a transaction occurs at a chestshop. |
| Generated Examples | after chestshop transaction:
on chestshop transaction: |
| Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Switches | type:<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".
|
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Group | Depenizen |
| Requires | Depenizen, ChestShop |
| Source | https://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/events/chestshop/ChestShopTransactionScriptEvent.java#L19 |
| Name | firework bursts |
| Event Lines | firework bursts |
| Triggers | when a firework bursts (explodes). |
| Generated Examples | after 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.
|
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/FireworkBurstsScriptEvent.java#L16 |
| Name | loot generates |
| Event Lines | loot generates |
| Triggers | when loot is generated somewhere in the world (like a vanilla chest being opened for the first time). |
| Generated Examples | after loot generates: |
| Has Player | when the linked entity is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Switches | for:<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. |
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | World |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/world/LootGenerateScriptEvent.java#L22 |
| Name | magicspells entity casts spell |
| Event Lines | magicspells <entity> casts <spell> |
| Triggers | when an entity starts to cast a spell. |
| Generated Examples | on magicspells firework_rocket casts spell:
after magicspells entity casts spell: |
| Has Player | When the caster is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Contexts | <context.spell_name> returns the name of the spell.
<context.caster> returns the entity that cast the spell.
<context.power> returns an ElementTag(Decimal) of the power of the spell.
<context.cast_time> returns an ElementTag(Number) of the cast time of the spell.
<context.cooldown> returns an ElementTag(Decimal) of the cooldown of the spell.
<context.spell_reagent_TYPE> returns an ElementTag(Number) of the reagent cost for the given type. Valid types are: mana, health, hunger, experience, levels, durability, money
<context.spell_reagent_variables> returns a ListTag in the form variable/cost|...
<context.spell_reagent_items> returns a ListTag of ItemTags of reagent cost.
|
| Determine | "POWER:<ElementTag(Number)>" to change the power of the spell.
"CAST_TIME:<ElementTag(Decimal)>" to change the cast time. "COOLDOWN:<ElementTag(Number)>" to change the cooldown. "REAGENT:<TYPE>:<ElementTag(Number)>" to change the reagent cost of the given type. Valid types are: mana, health, hunger, experience, levels, durability, money "REAGANT:VARIABLE:<NAME>:<ElementTag(Decimal)>" to change the reagant cost for the given variable name. "REAGENT:ITEMS:<ListTag(ItemTag)>" to change the reagent item cost. "CLEAR_REAGENTS" to clear away all reagent costs. |
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Group | Depenizen |
| Requires | Depenizen, MagicSpells |
| Source | https://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/events/magicspells/SpellCastScriptEvent.java#L26 |
| Name | mythicmob mob dies|death|killed |
| Event Lines | mythicmob <mob> dies|death|killed |
| Triggers | when a MythicMob dies. |
| Generated Examples | after mythicmob mob killed:
on mythicmob mob death: |
| Switches | by:<entity> to only process the event if the killer matches a specified entity type. |
| Contexts | <context.mob> Returns the MythicMob that has been killed.
<context.entity> Returns the EntityTag for the MythicMob.
<context.killer> returns the EntityTag that killed the MythicMob (if available).
<context.level> Returns the level of the MythicMob.
<context.drops> Returns a list of items dropped.
|
| Determine | ListTag(ItemTag) to specify new items to be dropped. |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Depenizen |
| Requires | Depenizen, MythicMobs |
| Source | https://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/events/mythicmobs/MythicMobsDeathEvent.java#L22 |
| Name | piglin barter |
| Event Lines | piglin barter |
| Triggers | when a piglin completes a barter. |
| Generated Examples | on piglin barter: |
| Switches | input:<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. |
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/PiglinBarterScriptEvent.java#L15 |
| Name | player right|left clicks block |
| Event Lines | player (right|left) clicks <block> |
| Triggers | when a player clicks on a block or in the air. |
| Generated Examples | after player left clicks waxed_oxidized_copper_grate:
on player clicks mossy_cobblestone_stairs: |
| Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Switches | with:<item> to only process the event if 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.
|
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Player |
| Warning(s) | this event may in some cases double-fire, requiring usage of the 'ratelimit' command (like 'ratelimit <player> 1t') to prevent doubling actions.
this sometimes fires at unexpected times, eg when dropping an item. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerClicksBlockScriptEvent.java#L22 |
| Name | player activates riptide |
| Event Lines | player activates riptide |
| Triggers | when a player activates the riptide effect. |
| Generated Examples | after player activates riptide: |
| Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Contexts | <context.item> returns the ItemTag of the trident.
|
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Player |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerRiptideScriptEvent.java#L15 |
| Name | player boosts elytra |
| Event Lines | player boosts elytra |
| Triggers | when a player boosts their elytra with a firework rocket while gliding. |
| Generated Examples | on player boosts elytra: |
| Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Switches | with:<item> to only process the event if the 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. |
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Paper |
| Requires | Paper |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/events/PlayerElytraBoostScriptEvent.java#L17 |
| Name | player breaks block |
| Event Lines | player breaks block
player breaks <material> |
| Triggers | when a player breaks a block. |
| Generated Examples | after player breaks block:
after player breaks nether_brick_stairs: on player breaks block: on player breaks material: |
| Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Switches | with:<item> to only process the event when the player is 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. |
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Synonyms (Search Aid) | player mines block, player mines ore, player digs block |
| Group | Player |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerBreaksBlockScriptEvent.java#L21 |
| Name | player chooses arrow |
| Event Lines | player chooses arrow |
| Triggers | when a player chooses an arrow to load a bow/crossbow. |
| Example | |
| Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Switches | arrow:<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.
|
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Player |
| Requires | Paper |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/events/PlayerChoosesArrowScriptEvent.java#L17 |
| Name | player completes skyblock challenge |
| Event Lines | player completes skyblock challenge |
| Triggers | when a player completes a skyblock challenge. |
| Generated Examples | on player completes skyblock challenge: |
| Has Player | Always. - 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.
|
| Group | Depenizen |
| Requires | Depenizen, A SkyBlock |
| Source | https://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/events/askyblock/PlayerCompletesSkyBlockChallengeScriptEvent.java#L17 |
| Name | player edits book |
| Event Lines | player edits book
player signs book |
| Triggers | when a player edits or signs a book. |
| Generated Examples | after player edits book:
after player signs book: |
| Has Player | Always. - 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. |
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Player |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerEditsBookScriptEvent.java#L21 |
| Name | player flips lectern page |
| Event Lines | player flips lectern page |
| Triggers | when the player flips to a page in a lectern. |
| Example | |
| Example | |
| Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Switches | book:<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. |
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Paper |
| Requires | Paper |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/events/PlayerLecternPageChangeScriptEvent.java#L16 |
| Name | player picks up launched arrow |
| Event Lines | player picks up launched arrow |
| Triggers | when a player picks up a launched arrow projectile entity that is embedded into the ground. Will not necessarily fire for creative players. |
| Generated Examples | after player picks up launched arrow: |
| Has Player | Always. - 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.
|
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Player |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerPickupArrowScriptEvent.java#L15 |
| Name | player receives links |
| Event Lines | player receives links |
| Triggers | when a player receives a list of server links. |
| Generated Examples | on player receives links: |
| Has Player | Always. - 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 Server Links Format.
"ADD_LINKS:<ListTag(MapTag)>" to send additional links to the player. Each item in the list must be a MapTag in Server Links Format. |
| Group | Paper |
| Requires | Paper |
| Warning(s) | this may fire early in the player login process, during which the linked player is essentially an offline player. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/events/PlayerReceivesLinksScriptEvent.java#L17 |
| Name | player right clicks entity |
| Event Lines | player right clicks <entity> |
| Triggers | when a player right clicks on an entity. |
| Generated Examples | after player right clicks entity:
after player right clicks cave_spider: |
| Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Switches | with:<item> to only process the event when the player is holding a specified item.
type:<entity> to only run if the entity clicked matches the entity input. |
| Contexts | <context.entity> returns the EntityTag the player is clicking on.
<context.item> returns the ItemTag the player is clicking with.
<context.hand> returns "offhand" or "mainhand" to indicate which hand was used to fire the event. Some events fire twice - once for each hand.
<context.click_position> returns a LocationTag of the click position (as a world-less vector, relative to the entity's center). This is only available when clicking armor stands.
|
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Player |
| Warning(s) | this event may in some cases double-fire, requiring usage of the 'ratelimit' command (like 'ratelimit <player> 1t') to prevent doubling actions. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerRightClicksEntityScriptEvent.java#L21 |
| Name | player selects stonecutter recipe |
| Event Lines | player selects stonecutter recipe |
| Triggers | when a player selects a recipe in a stonecutter. |
| Generated Examples | on player selects stonecutter recipe:
after player selects stonecutter recipe: |
| Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Switches | recipe_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.
|
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Player |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/events/PlayerSelectsStonecutterRecipeScriptEvent.java#L16 |
| Name | player uses recipe book |
| Event Lines | player uses recipe book |
| Triggers | when a player interacts with their recipe book. |
| Generated Examples | on player uses recipe book:
after player uses recipe book: |
| Has Player | Always. - 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'.
|
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Paper |
| Requires | Paper |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/events/PlayerClicksInRecipeBookScriptEvent.java#L14 |
| Name | shopkeeper trade |
| Event Lines | shopkeeper trade |
| Triggers | when a trade with a shopkeeper is completed.
If you intend to cancel this event, use ShopKeeperTradeInitiatedScriptEvent instead. |
| Generated Examples | on shopkeeper trade: |
| Has Player | Always. - 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.
|
| Group | Depenizen |
| Requires | Depenizen, ShopKeepers |
| Source | https://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/events/shopkeepers/ShopKeeperTradeCompletedScriptEvent.java#L15 |
| Name | shopkeepers player tries trading |
| Event Lines | shopkeepers player tries trading |
| Triggers | when a trade with a shopkeeper is initiated. |
| Generated Examples | on shopkeepers player tries trading: |
| Has Player | Always. - 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.
|
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Group | Depenizen |
| Requires | Depenizen, 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. |
| Source | https://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/events/shopkeepers/ShopKeeperTradeInitiatedScriptEvent.java#L15 |
| Name | Advanced Object Matchables |
| Description | Script 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 LocationTag and 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 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 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. |
| Group | Object System |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/BukkitScriptEvent.java#L45 |
| Name | Advanced Object Matching |
| Description | Script 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 ObjectTag.advanced_matches, or in if with the 'matches' operator. Object types have their own special supported matchable inputs, refer to Advanced Object Matchables. |
| Group | Object System |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/events/ScriptEvent.java#L828 |
| Name | Attribute Modifiers |
| Description | In 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 EntityTag.attribute_modifiers, ItemTag.attribute_modifiers, EntityTag.has_attribute, EntityTag.attribute_value, EntityTag.attribute_base_value, EntityTag.attribute_default_value, ... These can be modified by such mechanisms as EntityTag.attribute_base_values, EntityTag.attribute_modifiers, EntityTag.add_attribute_modifiers, EntityTag.remove_attribute_modifiers, ItemTag.attribute_modifiers, ItemTag.add_attribute_modifiers, 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):
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:
When pre-defining a custom item, instead of this, simply use an item script: item script containers. That page shows an example of valid attribute modifiers on an item script. |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityAttributeModifiers.java#L208 |
| Name | Book Script Containers |
| Description | Book 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 |
| Group | Script Container System |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/containers/core/BookScriptContainer.java#L19 |
| Name | Click Triggers |
| Description | Click Triggers are triggered when a player right clicks the NPC.
These are very basic with no extraneous complexity.
They can optionally have an item matcher with multiple triggers, for the item in the player's hand. For example: |
| Group | NPC Interact Scripts |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/triggers/core/ClickTrigger.java#L25 |
| Name | Data Actions |
| Description | Several commands function as a way to modify data values,
including flag, yaml, and 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. |
| Group | Useful Lists |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/utilities/data/DataActionType.java#L5 |
| Name | Enchantment Script Containers |
| Description | Enchantment 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). |
| Group | Script Container System |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/containers/core/EnchantmentScriptContainer.java#L33 |
| Name | Flag System |
| Description | The 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 define. For more generic memory options, see yaml or 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 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 FlaggableObject.flag, FlaggableObject.has_flag, FlaggableObject.flag_expiration, 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 FlaggableObject.flag_map and the '__raw' prefix in a flag command. For example:
ItemTags, rather than using the flag command, are primarily flagged via inventory with the 'flag' argument, or via ItemTag.with_flag, or via the item script container. Additionally, flags be searched for with tags like server.online_players_flagged, server.players_flagged, server.spawned_npcs_flagged, server.npcs_flagged, ... Flags can also be required by script event lines, as explained at Script Event Switches. Item flags can also be used as a requirement in 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 zap, - '__interact_cooldown' which is used for interact script cooldowns, related to cooldown. |
| Group | Denizen Scripting Language |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/core/FlagCommand.java#L34 |
| Name | Inventory Actions |
| Description | Used 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. |
| Group | Useful Lists |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerClicksInInventoryScriptEvent.java#L20 |
| Name | Inventory Script Containers |
| Description | Inventory 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. |
| Group | Script Container System |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/containers/core/InventoryScriptContainer.java#L26 |
| Name | Map Script Containers |
| Description | Map scripts allow you define custom in-game map items, for usage with the map command.
The following is the format for the container.
A list of cursor types is available through server.map_cursor_types. |
| Group | Script Container System |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/containers/core/MapScriptContainer.java#L23 |
| Name | MythicMobs Bridge |
| Description | In 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 EntityTag and 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 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>} |
| Group | Depenizen Bridges |
| Requires | Depenizen, MythicMobs |
| Source | https://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/utilities/mythicmobs/MythicMobsLoaders.java#L20 |
| Name | ObjectTags |
| Description | ObjectTags 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! |
| Group | Object System |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/utilities/CommonRegistries.java#L29 |
| Name | Player Entity Skins (Skin Blobs) |
| Description | Player 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). |
| Group | Minecraft Logic |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/nms/abstracts/ProfileEditor.java#L54 |
| Name | Raw NBT Encoding |
| Description | Several 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 |
| Group | Useful Lists |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemRawNBT.java#L111 |
| Name | Safety In Events |
| Description | One 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:
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".
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 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. |
| Group | Script Events |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/BukkitScriptEvent.java#L1014 |
| Name | Slot Inputs |
| Description | Whenever 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. |
| Group | Useful Lists |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/utilities/inventory/SlotHelper.java#L72 |
| Name | The Player and NPC Arguments |
| Description | The "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: |
| Group | Script Command System |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/utilities/implementation/DenizenCoreImplementation.java#L107 |
| Name | Unique Objects vs Generic Objects |
| Description | There 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. |
| Group | Object System |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/ObjectTag.java#L43 |
| Name | Virtual Inventories |
| Description | Virtual 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. |
| Group | Inventory System |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/item/InventoryCommand.java#L65 |
| Name | custom_name |
| Object | EntityTag |
| Input | ElementTag |
| Related Tags | <EntityTag.custom_name> Returns the entity's custom name (as set by plugin or name tag item), if any.
|
| Description | Sets the custom name (equivalent to a name tag item) of the entity.
Provide no input to remove the custom name. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityCustomName.java#L60 |
| Name | disabled_slots |
| Object | EntityTag |
| Input | MapTag |
| 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.
|
| Description | Sets 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. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityDisabledSlots.java#L159 |
| Name | display |
| Object | EntityTag |
| Input | ElementTag |
| 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 |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityDisplay.java#L11 |
| Name | drinking_potion |
| Object | EntityTag |
| Input | ItemTag |
| Related Tags | <EntityTag.drinking_potion> Returns the potion item a witch is drinking, or air if none.
|
| Description | Sets the potion item a witch is drinking. |
| Generated Example | |
| Group | properties |
| Requires | Paper |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/properties/EntityDrinkingPotion.java#L86 |
| Name | equipment_drop_chance |
| Object | EntityTag |
| Input | MapTag |
| 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 | |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityEquipmentDropChance.java#L12 |
| Name | fake_pickup |
| Object | EntityTag |
| Input | EntityTag |
| Description | Makes 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 | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EntityTag.java#L4509 |
| Name | fixed |
| Object | EntityTag |
| Input | ElementTag(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).
|
| Description | Sets whether this item frame is fixed. (Meaning, it can't be altered by players or broken by block obstructions). |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityFixed.java#L76 |
| Name | framed |
| Object | EntityTag |
| Input | ItemTag(|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.
|
| Description | Sets 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 |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityFramed.java#L131 |
| Name | inventory_contents |
| Object | EntityTag |
| Input | ListTag(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.
|
| Description | Clears the entity's inventory and sets it's item list to match the input. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityInventory.java#L84 |
| Name | pickup_delay |
| Object | EntityTag |
| Input | DurationTag |
| Related Tags | <EntityTag.pickup_delay> Returns how long before the item-type entity can be picked up by a player.
|
| Description | Sets the pickup delay of this Item Entity. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EntityTag.java#L3978 |
| Name | potion |
| Object | EntityTag |
| Input | ItemTag |
| Related Tags | <EntityTag.potion> (Property) Deprecated in favor of EntityTag.potion_type for arrows, and EntityTag.item for splash potions.
|
| Description | (Property) Deprecated in favor of EntityTag.potion_type for arrows, and EntityTag.item for splash potions. |
| Generated Example | |
| Group | Properties |
| Deprecated | use 'EntityTag.potion_type' for arrows, and 'EntityTag.item' for splash potions. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityPotion.java#L19 |
| Name | potion_effects |
| Object | EntityTag |
| Input | ListTag |
| 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. (...)
|
| Description | Set 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 Potion Effect Format. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityPotionEffects.java#L169 |
| Name | potion_type |
| Object | EntityTag |
| Input | ElementTag |
| 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 EntityTag.potion_effects to control the potion effects applied. Specify no input to remove the base potion type. |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityPotionType.java#L13 |
| Name | redo_attack_cooldown |
| Object | EntityTag |
| Input | None |
| 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 (...)
|
| Description | Forces 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 | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EntityTag.java#L4392 |
| Name | time_lived |
| Object | EntityTag |
| Input | DurationTag |
| Related Tags | <EntityTag.time_lived> Returns how long the entity has lived.
|
| Description | Sets 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 EntityTag.auto_expire |
| Generated Example | |
| Synonyms (Search Aid) | entitytag.age_nbt, entitytag.time_nbt |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EntityTag.java#L3650 |
| Name | visible |
| Object | EntityTag |
| Input | ElementTag(Boolean) |
| Related Tags | <EntityTag.visible> Returns whether the entity is visible. (...)
|
| Description | Sets whether the entity is visible.
Supports armor stands, item frames, and living entities. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityVisible.java#L73 |
| Name | contents |
| Object | InventoryTag |
| Input | ListTag(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 (...)
|
| Description | Sets the contents of the inventory. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/inventory/InventoryContents.java#L185 |
| Name | fuel |
| Object | InventoryTag |
| Input | ItemTag |
| Related Tags | <InventoryTag.fuel> Returns the item currently in the fuel section of a furnace or brewing stand inventory.
|
| Description | Sets the item in the fuel slot of this furnace or brewing stand inventory. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L2452 |
| Name | input |
| Object | InventoryTag |
| Input | ItemTag |
| 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.
|
| Description | Sets the item in the smelting slot of a furnace inventory, or ingredient slot of a brewing stand inventory. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L2473 |
| Name | matrix |
| Object | InventoryTag |
| Input | ListTag(ItemTag) |
| Related Tags | <InventoryTag.matrix> Returns the items currently in a crafting inventory's matrix.
|
| Description | Sets the items in the matrix slots of this crafting inventory. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L2404 |
| Name | reformat |
| Object | InventoryTag |
| Input | ElementTag |
| Description | Reformats 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". |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L2528 |
| Name | result |
| Object | InventoryTag |
| Input | ItemTag |
| Related Tags | <InventoryTag.result> Returns the item currently in the result section of a crafting inventory or furnace inventory.
|
| Description | Sets the item in the result slot of this crafting inventory or furnace inventory. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L2428 |
| Name | jukebox_record |
| Object | LocationTag |
| Input | ItemTag |
| Related Tags | <LocationTag.jukebox_record> Returns the record item currently inside the jukebox. (...)
|
| Description | Sets the record item played by a jukebox. Give no input to set the jukebox to empty.
See also LocationTag.jukebox_play. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L5305 |
| Name | lock |
| Object | LocationTag |
| Input | ElementTag |
| 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.
|
| Description | Sets 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. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L4814 |
| Name | max_stack_size |
| Object | MaterialTag |
| Input | ElementTag(Number) |
| Related Tags | <MaterialTag.max_stack_size> Returns the maximum amount of this material that can be held in a stack.
|
| Description | Sets 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 | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/MaterialTag.java#L742 |
| Name | hologram_lines |
| Object | NPCTag |
| Input | ListTag |
| Related Tags | <NPCTag.hologram_lines> Returns the list of hologram lines attached to an NPC.
|
| Description | Sets 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 |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/NPCTag.java#L1346 |
| Name | add_links |
| Object | PlayerTag |
| Input | ListTag(MapTag) |
| Description | Adds the specified list of server links to the player. Each item in the list must be a MapTag in Server Links Format. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L2698 |
| Name | fake_equipment |
| Object | PlayerTag |
| Input | EntityTag(|ElementTag|ItemTag) |
| Description | Shows 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 fakeequip. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L3603 |
| Name | firework_boost |
| Object | PlayerTag |
| Input | ItemTag |
| Description | Firework boosts the player with the specified firework rocket.
The player must be gliding. |
| Generated Example | |
| Group | paper |
| Requires | Paper |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/properties/PaperPlayerExtensions.java#L112 |
| Name | links |
| Object | PlayerTag |
| Input | ListTag(MapTag) |
| Description | Sends 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 Server Links Format. Generally prefer PlayerTag.add_links. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L2685 |
| Name | resend_recipes |
| Object | PlayerTag |
| Input | None |
| Description | Sends 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 | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L3783 |
| Name | show_book |
| Object | PlayerTag |
| Input | ItemTag |
| Description | Displays 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 | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L3765 |
| Name | add_links |
| Object | server |
| Input | ListTag(MapTag) |
| Description | Adds links to the default server links. Each item in the list must be a MapTag in Server Links Format. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L2049 |
| Name | links |
| Object | server |
| Input | ListTag(MapTag) |
| Description | Sets the default server links. Each item in the list must be a MapTag in Server Links Format.
Generally prefer server.add_links. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L2037 |
| Name | reset_recipes |
| Object | server |
| Input | None |
| Related Tags | <server.recipe_ids[(<type>)]> Returns a list of all recipe IDs on the server. (...)
|
| Description | Resets the server's recipe list to the default vanilla recipe list + item script recipes. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L1900 |
| Name | inputs |
| Object | TradeTag |
| Input | ListTag(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. |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/trade/TradeInputs.java#L14 |
| Name | result |
| Object | TradeTag |
| Input | ItemTag |
| 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 | |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/trade/TradeResult.java#L9 |
| Name | ElementTag |
| Prefix | el@ |
| Identity Format | Just the plain text of the element value, no prefix or formatting. |
| Description | ElementTags 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. |
| Matchable | ElementTag 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 By | AreaShopTag, 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 |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ElementTag.java#L30 |
| Name | EnchantmentTag |
| Prefix | enchantment@ |
| Base Type | ElementTag |
| Implements | FlaggableObject |
| Identity Format | The 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'. |
| Description | An 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" |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EnchantmentTag.java#L28 |
| Name | EntityTag |
| Prefix | e@ |
| Base Type | ElementTag |
| Implements | FlaggableObject, PropertyHolderObject |
| Identity Format | The identity format for entities is a spawned entity's UUID, or an entity type.
For example, 'e@abc123' or 'e@zombie'. |
| Description | An 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. |
| Matchable | EntityTag 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 By | NPCTag, PlayerTag |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EntityTag.java#L65 |
| Name | MaterialTag |
| Prefix | m@ |
| Base Type | ElementTag |
| Implements | FlaggableObject, PropertyHolderObject |
| Identity Format | The identity format for materials is the material type name.
For example, 'm@stick'. |
| Description | A 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" |
| Matchable | MaterialTag 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". |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/MaterialTag.java#L37 |
| Name | TradeTag |
| Prefix | trade@ |
| Base Type | ElementTag |
| Implements | PropertyHolderObject |
| Identity Format | The identity format for trades is just the text 'trade'. All other data is specified through properties. |
| Description | Merchant 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. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/TradeTag.java#L17 |
| Name | <&hover[<hover_text>].type[<type>]> |
| Returns | ElementTag |
| Description | Returns 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 Denizen Text Formatting. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/TextTagBase.java#L46 |
| Name | <&optimize> |
| Returns | ElementTag |
| Description | Returns 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 Denizen Text Formatting. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/TextTagBase.java#L339 |
| Name | <AreaObject.living_entities> |
| Returns | ListTag(EntityTag) |
| Description | Gets a list of all living entities currently within the area.
This includes Players, mobs, NPCs, etc., but excludes dropped items, experience orbs, etc. |
| Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/AreaContainmentObject.java#L196 |
| Name | <ChunkTag.living_entities> |
| Returns | ListTag(EntityTag) |
| Description | Returns a list of living entities in the chunk.
This includes Players, mobs, NPCs, etc., but excludes dropped items, experience orbs, etc. |
| Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/ChunkTag.java#L554 |
| Name | <crackshot.weapon[<weapon_name>]> |
| Returns | ItemTag |
| Description | Returns the ItemTag for the CrackShot weapon title specified, if it exists. https://github.com/Shampaggon/CrackShot/wiki/The-Complete-Guide-to-CrackShot#title |
| Requires | Depenizen, CrackShot |
| Source | https://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/bridges/CrackShotBridge.java#L51 |
| Name | <ElementTag.lines_to_colored_list> |
| Returns | ListTag |
| Description | Returns a list of lines in the element, with colors spread over the lines manually.
Useful for things like item lore. |
| Generated Example | |
| Group | element manipulation |
| Source | https://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>]> |
| Returns | ElementTag |
| Description | Adds 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 Denizen Text Formatting. For show_text, prefer ElementTag.on_hover For show_item, prefer ElementTag.hover_item |
| Group | text manipulation |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/bukkit/BukkitElementExtensions.java#L475 |
| Name | <ElementTag.optimize_json> |
| Returns | ElementTag |
| Description | 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 Denizen Text Formatting. |
| Generated Example | |
| Group | conversion |
| Source | https://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[<#>]> |
| Returns | ListTag |
| Description | Returns 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. |
| Group | element manipulation |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ElementTag.java#L1584 |
| Name | <EntityTag.custom_name> |
| Returns | ElementTag |
| Mechanism | EntityTag.custom_name |
| Description | Returns the entity's custom name (as set by plugin or name tag item), if any. |
| Generated Example | |
| Group | attributes |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityCustomName.java#L44 |
| Name | <EntityTag.display> |
| Returns | ElementTag |
| Mechanism | EntityTag.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 | |
| Synonyms (Search Aid) | entitytag.display_transform, entitytag.text_alignment |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityDisplay.java#L11 |
| Name | <EntityTag.drinking_potion> |
| Returns | ItemTag |
| Mechanism | EntityTag.drinking_potion |
| Description | Returns the potion item a witch is drinking, or air if none. |
| Generated Example | |
| Group | properties |
| Requires | Paper |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/properties/EntityDrinkingPotion.java#L41 |
| Name | <EntityTag.equipment_drop_chance> |
| Returns | MapTag |
| Mechanism | EntityTag.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 | |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityEquipmentDropChance.java#L12 |
| Name | <EntityTag.equipment_map> |
| Returns | MapTag |
| Mechanism | EntityTag.equipment |
| Description | Returns 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 | |
| Group | inventory |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityEquipment.java#L71 |
| Name | <EntityTag.fixed> |
| Returns | ElementTag(Boolean) |
| Mechanism | EntityTag.fixed |
| Description | Returns whether the item frame is fixed. (Meaning, it can't be altered by players or broken by block obstructions). |
| Generated Example | |
| Group | attributes |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityFixed.java#L57 |
| Name | <EntityTag.pickup_delay> |
| Returns | DurationTag |
| Mechanism | EntityTag.pickup_delay |
| Description | Returns how long before the item-type entity can be picked up by a player. |
| Generated Example | |
| Group | attributes |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EntityTag.java#L2252 |
| Name | <EntityTag.potion_type> |
| Returns | ElementTag |
| Mechanism | EntityTag.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 EntityTag.potion_effects to control the potion effects applied. |
| Generated Example | |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityPotionType.java#L13 |
| Name | <EntityTag.potion> |
| Returns | ItemTag |
| Mechanism | EntityTag.potion |
| Description | (Property) Deprecated in favor of EntityTag.potion_type for arrows, and EntityTag.item for splash potions. |
| Generated Example | |
| Group | Properties |
| Deprecated | use 'EntityTag.potion_type' for arrows, and 'EntityTag.item' for splash potions. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityPotion.java#L19 |
| Name | <EntityTag.saddle> |
| Returns | ItemTag |
| Description | If the entity is a horse or pig, returns the saddle as a ItemTag, or air if none. |
| Generated Example | |
| Group | inventory |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EntityTag.java#L1429 |
| Name | <EntityTag.trace_framed_map> |
| Returns | MapTag |
| Description | Returns 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 | |
| Group | location |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EntityTag.java#L1511 |
| Name | <EntityTag.visible> |
| Returns | ElementTag(Boolean) |
| Mechanism | EntityTag.visible |
| Description | Returns whether the entity is visible.
Supports armor stands, item frames, and living entities. |
| Generated Example | |
| Group | attributes |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityVisible.java#L60 |
| Name | <EntityTag.weapon_damage[(<entity>)]> |
| Returns | ElementTag(Number) |
| Description | Returns 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 | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EntityTag.java#L2514 |
| Name | <InventoryTag.contains.display[(strict:)<element>].quantity[<#>]> |
| Returns | ElementTag(Boolean) |
| Description | Returns 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. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L1516 |
| Name | <InventoryTag.contains.display[(strict:)<element>]> |
| Returns | ElementTag(Boolean) |
| Description | Returns 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. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L1493 |
| Name | <InventoryTag.contains.lore[(strict:)<element>|...].quantity[<#>]> |
| Returns | ElementTag(Boolean) |
| Description | Returns 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. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L1599 |
| Name | <InventoryTag.contains.lore[(strict:)<element>|...]> |
| Returns | ElementTag(Boolean) |
| Description | Returns 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. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L1575 |
| Name | <InventoryTag.craftable_quantity> |
| Returns | ElementTag(Number) |
| Description | Returns the quantity of items that would be received if this crafting inventory were fully crafted (eg via a shift click). |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L2230 |
| Name | <InventoryTag.equipment_map> |
| Returns | MapTag |
| Description | Returns 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 | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L2158 |
| Name | <InventoryTag.equipment> |
| Returns | ListTag(ItemTag) |
| Description | Returns 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 | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L2171 |
| Name | <InventoryTag.fuel> |
| Returns | ItemTag |
| Mechanism | InventoryTag.fuel |
| Description | Returns the item currently in the fuel section of a furnace or brewing stand inventory. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L2315 |
| Name | <InventoryTag.input> |
| Returns | ItemTag |
| Mechanism | InventoryTag.input |
| Description | Returns the item currently in the smelting slot of a furnace inventory, or the ingredient slot of a brewing stand inventory. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L2332 |
| Name | <InventoryTag.list_contents.simple> |
| Returns | ListTag(ItemTag) |
| Mechanism | InventoryTag.contents |
| Description | Returns a list of all items in the inventory, without item properties. |
| Group | properties |
| Source | https://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> |
| Returns | ListTag(ItemTag) |
| Mechanism | InventoryTag.contents |
| Description | Returns a list of all items in the inventory with the specified
lore, without item properties. Color codes are ignored. |
| Group | properties |
| Source | https://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>]> |
| Returns | ListTag(ItemTag) |
| Mechanism | InventoryTag.contents |
| Description | Returns a list of all items in the inventory with the specified
lore. Color codes are ignored. |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/inventory/InventoryContents.java#L147 |
| Name | <InventoryTag.list_contents> |
| Returns | ListTag(ItemTag) |
| Mechanism | InventoryTag.contents |
| Description | Returns a list of all items in the inventory. |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/inventory/InventoryContents.java#L124 |
| Name | <InventoryTag.map_slots> |
| Returns | MapTag |
| Description | Returns a map of inventory slots to the items in those slots (excludes air). |
| Generated Example | |
| Group | properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/inventory/InventoryContents.java#L105 |
| Name | <InventoryTag.matrix> |
| Returns | ListTag(ItemTag) |
| Mechanism | InventoryTag.matrix |
| Description | Returns the items currently in a crafting inventory's matrix. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L2183 |
| Name | <InventoryTag.result> |
| Returns | ItemTag |
| Mechanism | InventoryTag.result |
| Description | Returns the item currently in the result section of a crafting inventory or furnace inventory. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L2250 |
| Name | <InventoryTag.slot[<#>|...]> |
| Returns | ObjectTag |
| Description | If 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. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L2096 |
| Name | <ListTag.closest_to[<text>]> |
| Returns | ElementTag |
| Description | Returns 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 | |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2734 |
| Name | <ListTag.deduplicate> |
| Returns | ListTag |
| Description | Returns a copy of the list with any duplicate items removed. |
| Example | |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1513 |
| Name | <ListTag.exclude_single[<value>]> |
| Returns | ListTag |
| Description | Returns 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 | |
| Example | |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1286 |
| Name | <ListTag.exclude[...|...].max[<#>]> |
| Returns | ListTag |
| Description | Returns 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 | |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1326 |
| Name | <ListTag.exclude[...|...]> |
| Returns | ListTag |
| Description | Returns a new ListTag excluding the items specified. |
| Example | |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1311 |
| Name | <ListTag.find_all_matches[<matcher>]> |
| Returns | ListTag |
| Description | Returns all the numbered indices of elements that match within a list,
using the system behind Advanced Object Matching, or an empty list if the list does not contain that item. |
| Example | |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1631 |
| Name | <ListTag.find_all_partial[<element>]> |
| Returns | ListTag |
| Description | Returns 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 | |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1610 |
| Name | <ListTag.find_all[<element>]> |
| Returns | ListTag |
| Description | Returns 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 | |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1654 |
| Name | <ListTag.find_match[<matcher>]> |
| Returns | ElementTag(Number) |
| Description | Returns the numbered index of the first match within a list,
using the system behind Advanced Object Matching, or -1 if the list does not contain that item. |
| Example | |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1695 |
| Name | <ListTag.find_partial[<element>]> |
| Returns | ElementTag(Number) |
| Description | Returns the numbered index of the first partially matching entry within a list,
or -1 if the list does not contain that item. |
| Example | |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1675 |
| Name | <ListTag.find[<element>]> |
| Returns | ElementTag(Number) |
| Description | Returns the numbered index of an entry within a list,
or -1 if the list does not contain that item. |
| Example | |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1716 |
| Name | <ListTag.include[...|...]> |
| Returns | ListTag |
| Description | Returns a new ListTag including the items specified. |
| Example | |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1271 |
| Name | <ListTag.insert_single[...|...].at[<#>]> |
| Returns | ListTag |
| Description | Returns a new ListTag with the single item specified inserted to the specified location.
Note the index input options described at listtag |
| Example | |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1109 |
| Name | <ListTag.insert[...|...].at[<#>]> |
| Returns | ListTag |
| Description | Returns a new ListTag with the items specified inserted to the specified location.
Note the index input options described at listtag |
| Example | |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1076 |
| Name | <ListTag.random[(<#>)]> |
| Returns | ObjectTag |
| Description | Gets a random item in the list and returns it.
Optionally, add [<#>] to instead get a list of multiple randomly chosen list entries. |
| Example | |
| Example | |
| Example | |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2692 |
| Name | <ListTag.remove[<#>].to[<#>]> |
| Returns | ListTag |
| Description | Returns a new ListTag excluding the items in the specified index range.
Note the index input options described at listtag |
| Example | |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1369 |
| Name | <ListTag.remove[<#>|...]> |
| Returns | ListTag |
| Description | Returns a new ListTag excluding the items at the specified index.
Note the index input options described at listtag |
| Example | |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1356 |
| Name | <ListTag.reverse> |
| Returns | ListTag |
| Description | Returns a copy of the list, with all items placed in opposite order. |
| Example | |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1498 |
| Name | <ListTag.separated_by[<text>]> |
| Returns | ElementTag |
| Description | Returns the list formatted, with each item separated by the defined text. |
| Example | |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L798 |
| Name | <ListTag.set_single[<value>].at[<#>]> |
| Returns | ListTag |
| Description | Returns 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 listtag |
| Example | |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1179 |
| Name | <ListTag.set[...|...].at[<#>]> |
| Returns | ListTag |
| Description | Returns 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 listtag |
| Example | |
| Example | |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1140 |
| Name | <ListTag.shared_contents[...|...]> |
| Returns | ListTag |
| Description | Returns 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 | |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L1413 |
| Name | <ListTag.sort_by_number[<tag>]> |
| Returns | ListTag |
| Description | Returns 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. |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2196 |
| Name | <ListTag.sort_by_value[<tag>]> |
| Returns | ListTag |
| Description | Returns 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. |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2159 |
| Name | <ListTag.sort[<procedure>]> |
| Returns | ListTag |
| Description | Returns 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. |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2250 |
| Name | <LocationTag.find.living_entities.within[<#.#>]> |
| Returns | ListTag(EntityTag) |
| Description | Returns 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). |
| Group | finding |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L3052 |
| Name | <LocationTag.furnace_cook_duration> |
| Returns | DurationTag |
| Mechanism | LocationTag.furnace_cook_duration |
| Description | Returns the cook time a furnace has been cooking its current item for. |
| Generated Example | |
| Group | world |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L3845 |
| Name | <LocationTag.jukebox_record> |
| Returns | ItemTag |
| Mechanism | LocationTag.jukebox_record |
| Description | Returns the record item currently inside the jukebox.
If there's no record, will return air. |
| Generated Example | |
| Group | world |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L4004 |
| Name | <LocationTag.skull_skin.full> |
| Returns | ElementTag |
| Mechanism | LocationTag.skull_skin |
| Description | Returns 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. |
| Group | world |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L1564 |
| Name | <MaterialTag.food_points> |
| Returns | ElementTag(Number) |
| Description | If 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 | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/MaterialTag.java#L664 |
| Name | <MaterialTag.is_enabled[<world>]> |
| Returns | ElementTag(Boolean) |
| Description | Returns 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 | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/MaterialTag.java#L679 |
| Name | <NPCTag.sentinel.drop_chances> |
| Returns | ListTag |
| Description | Returns a list of drop chances for items that this Sentinel NPC will drop on death. |
| Requires | Depenizen, Sentinel |
| Source | https://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/properties/sentinel/SentinelNPCProperties.java#L402 |
| Name | <NPCTag.sentinel.drops> |
| Returns | ListTag(ItemTag) |
| Description | Returns a list of items that this Sentinel NPC will drop on death. |
| Requires | Depenizen, Sentinel |
| Source | https://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/properties/sentinel/SentinelNPCProperties.java#L387 |
| Name | <NPCTag.skull_skin> |
| Returns | ElementTag |
| Description | Returns 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 Player Entity Skins (Skin Blobs). |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/NPCTag.java#L873 |
| Name | <ObjectTag.is_truthy> |
| Returns | ElementTag(Boolean) |
| Description | Returns 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. |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/tags/CoreObjectTags.java#L127 |
| Name | <PlayerTag.skillapi.skill_indicator[<skill>]> |
| Returns | ItemTag |
| Description | Returns the indicator item for the skill. |
| Requires | Depenizen, SkillAPI |
| Source | https://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/properties/skillapi/SkillAPIPlayerProperties.java#L249 |
| Name | <PlayerTag.skull_skin> |
| Returns | ElementTag |
| Description | Returns 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 Player Entity Skins (Skin Blobs). |
| Generated Example | |
| Source | https://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})]> |
| Returns | ListTag(ItemTag) |
| Description | Returns 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 | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L1796 |
| Name | <server.pattern_types> |
| Returns | ListTag |
| Description | Returns a list of all banner patterns known to the server.
Generally used with ItemTag.patterns. For the default ("vanilla") pattern types, see the "Resource name" column in https://minecraft.wiki/w/Banner/Patterns. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L871 |
| Name | <server.potion_types> |
| Returns | ListTag |
| Description | Returns 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 server.potion_effect_types. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L905 |
| Name | <server.recipe_result[<id>]> |
| Returns | ItemTag |
| Description | Returns the item that a recipe will create when crafted.
Brewing recipes are only supported on Paper, and only custom ones are available. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L335 |
| Name | <server.vanilla_material_tags> |
| Returns | ListTag |
| Description | Returns a list of vanilla tags applicable to blocks, fluids, or items. See also https://minecraft.wiki/w/Tag. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L1726 |
| Name | <SkillAPIClassTag.icon> |
| Returns | ItemTag |
| Description | Returns the item icon representing this SkillAPI class in menus. |
| Requires | Depenizen, SkillAPI |
| Source | https://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/objects/skillapi/SkillAPIClassTag.java#L189 |
| Name | <TradeTag.inputs> |
| Returns | ListTag(ItemTag) |
| Mechanism | TradeTag.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 | |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/trade/TradeInputs.java#L14 |
| Name | <WorldTag.living_entities> |
| Returns | ListTag(EntityTag) |
| Description | Returns a list of living entities in this world.
This includes Players, mobs, NPCs, etc., but excludes dropped items, experience orbs, etc. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/WorldTag.java#L273 |
| Name | Advancement |
| Syntax | advancement [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 Description | Controls a custom advancement. |
| Full Description | Controls 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 PlayerTag.award_advancement WARNING: Failure to re-create advancements on every server start may result in loss of data - use server prestart. If you mess with datapacks, you will also need to re-create advancements during 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 | |
| Usage Example | |
| Usage Example | |
| Group | player |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/player/AdvancementCommand.java#L36 |
| Name | CustomEvent |
| Syntax | customevent [id:<id>] (context:<map>) |
| Short Description | Fires a custom world script event. |
| Full Description | Fires 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 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 | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Group | core |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/core/CustomEventCommand.java#L23 |
| Name | Engage |
| Syntax | engage (<duration>) (player) |
| Short Description | Temporarily disables an NPCs toggled interact script-container triggers. |
| Full Description | Engaging 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 Disengage |
| Related Tags | <NPCTag.engaged> Returns whether the NPC is currently engaged. (...)
|
| Usage Example | |
| Usage Example | |
| Group | npc |
| Requires | Citizens |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/npc/EngageCommand.java#L30 |
| Name | FakeInternalData |
| Syntax | fakeinternaldata [entity:<entity>] [data:<map>|...] (for:<player>|...) (speed:<duration>) |
| Short Description | Sends fake entity data updates, optionally animating them with sub-tick precision. |
| Full Description | Sends 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 MapTags, with each map being a frame to send; see 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 Tags | None
|
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Group | entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/FakeInternalDataCommand.java#L46 |
| Name | Firework |
| Syntax | firework (<location>) (power:<#>) (<type>/random) (primary:<color>|...) (fade:<color>|...) (flicker) (trail) (life:<duration>) |
| Short Description | Launches a firework with customizable style. |
| Full Description | This 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 | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Group | world |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/world/FireworkCommand.java#L38 |
| Name | Flag |
| Related Guide Page | https://guide.denizenscript.com/guides/basics/flags.html |
| Syntax | flag [<object>|...] [<name>([<#>])](:<action>)[:<value>] (expire:<time>) |
| Short Description | Sets or modifies a flag on any flaggable object. |
| Full Description | The flag command sets or modifies custom data values stored on any flaggable object (the server, a player/NPC/entity, a block location, ...).
See also flag system. This command supports data actions, see 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 | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Group | core |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/core/FlagCommand.java#L77 |
| Name | Gamerule |
| Syntax | gamerule [<world>] [<rule>] [<value>] |
| Short Description | Sets a gamerule on the world. |
| Full Description | Sets 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 | |
| Usage Example | |
| Group | world |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/world/GameRuleCommand.java#L25 |
| Name | If |
| Related Guide Page | https://guide.denizenscript.com/guides/basics/if-command.html |
| Syntax | if [<value>] (!)(<operator> <value>) (&&/|| ...) [<commands>] |
| Short Description | Compares values, and runs a subset of commands if they match. |
| Full Description | Compares 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 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 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 | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Group | queue |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/queue/IfCommand.java#L28 |
| Name | Mongo |
| Syntax | mongo [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 Description | Interacts with a MongoDB server. |
| Full Description | This 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 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 ~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 | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Group | core |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/core/MongoCommand.java#L36 |
| Name | Remove |
| Syntax | remove [<entity>|...] (world:<world>) |
| Short Description | Despawns an entity or list of entities, permanently removing any NPCs. |
| Full Description | Removes 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 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 | |
| Usage Example | |
| Usage Example | |
| Group | entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/RemoveCommand.java#L28 |
| Name | Toast |
| Syntax | toast [<text>] (targets:<player>|...) (icon:<item>) (frame:{task}/challenge/goal) |
| Short Description | Shows the player a custom advancement toast. |
| Full Description | Displays 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 Tags | None
|
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Group | player |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/player/ToastCommand.java#L34 |
| Name | Webget |
| Syntax | webget [<url>] (data:<data>) (method:<method>) (headers:<map>) (timeout:<duration>/{10s}) (savefile:<path>) (hide_failure) |
| Short Description | Gets the contents of a web page or API response. |
| Full Description | Connects 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 ~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 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 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 | |
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Synonyms (Search Aid) | wget |
| Group | core |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/core/WebGetCommand.java#L39 |
| Name | Potion Effect Format |
| Description | Potion effects (be it on an entity, given by a potion, etc.) are represented in Denizen as 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 (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. |
| Group | Minecraft Logic |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemPotion.java#L32 |
| Name | ListTag |
| Prefix | li@ |
| Base Type | ElementTag |
| Identity Format | The 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 "&". This is a subset of Denizen standard escaping, see Escaping System. |
| Description | A 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 |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L32 |
| Name | MapTag |
| Prefix | map@ |
| Base Type | ElementTag |
| Identity Format | The 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 "&". This is a subset of Denizen standard escaping, see Escaping System. |
| Description | A 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. |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/MapTag.java#L25 |
| Name | <EntityTag.equipment> |
| Returns | ListTag(ItemTag) |
| Mechanism | EntityTag.equipment |
| Description | Deprecated in favor of EntityTag.equipment_map. |
| Generated Example | |
| Group | inventory |
| Deprecated | Use 'EntityTag.equipment_map'. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityEquipment.java#L57 |
| Name | <EntityTag.horse_armor> |
| Returns | ItemTag |
| Description | Deprecated in favor of EntityTag.equipment_map with the 'body' key on MC 1.20+. |
| Generated Example | |
| Group | inventory |
| Deprecated | Use 'EntityTag.equipment_map.get[body]' on MC 1.20+. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EntityTag.java#L1446 |
| Name | <ShopKeeperTag.trades> |
| Returns | ListTag(ListTag(ItemTag)) |
| Description | Returns a ListTag of the Shopkeeper's trades (as sub-lists). |
| Requires | Depenizen, ShopKeepers |
| Source | https://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/objects/shopkeepers/ShopKeeperTag.java#L131 |
| Name | <TradeTag.result> |
| Returns | ItemTag |
| Mechanism | TradeTag.result |
| Description | (Property) Returns what the trade will give the player. |
| Generated Example | |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/trade/TradeResult.java#L9 |