inventory
out of 3884 meta-documentation entries...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#L95 |
Name | <inventory[<inventory>]> |
Returns | InventoryTag |
Description | Returns an inventory object constructed from the input value.
Refer to InventoryTag. |
Generated Example |
|
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/utilities/CommonRegistries.java#L228 |
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 hopper picks up red_stained_glass:
on composter picks up lime_candle: |
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 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 trapped_chest moves from inventory:
after item moves from blast_furnace: |
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 | 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 in inventory:
on player clicks in enderchest: |
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 closes inventory |
Event Lines | player closes inventory
player closes <inventory> |
Triggers | when a player closes an inventory. |
Generated Examples | after player closes inventory:
after player closes dispenser: after player closes shulker_box: |
Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Contexts | <context.inventory> returns the InventoryTag.
|
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/PlayerClosesInvScriptEvent.java#L18 |
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:
on player drags item in furnace: on player drags glass_bottle: |
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 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:
on 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 opens inventory |
Event Lines | player opens inventory
player opens <inventory> |
Triggers | when a player opens an inventory. (EG, chests, not the player's main inventory.) |
Generated Examples | after player opens inventory:
after player opens entity: after player opens cartography: |
Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Contexts | <context.inventory> returns the InventoryTag.
|
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/PlayerOpensInvScriptEvent.java#L16 |
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 | 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 | anvil_max_repair_cost |
Object | InventoryTag |
Input | ElementTag(Number) |
Related Tags | <InventoryTag.anvil_max_repair_cost> Returns the maximum repair cost on an anvil.
|
Description | Sets the maximum repair cost of an anvil. |
Generated Example |
|
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L2494 |
Name | anvil_repair_cost |
Object | InventoryTag |
Input | ElementTag(Number) |
Related Tags | <InventoryTag.anvil_repair_cost> Returns the current repair cost on an anvil.
|
Description | Sets the current repair cost of an anvil. |
Generated Example |
|
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L2511 |
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 | size |
Object | InventoryTag |
Input | ElementTag(Number) |
Related Tags | <InventoryTag.size> (Property) Returns the size of the inventory. (...)
|
Description | (Property) Sets the size of the inventory.
Note that the mechanism can only be set for "generic" chest inventories. |
Generated Example |
|
Group | Properties |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/inventory/InventorySize.java#L12 |
Name | title |
Object | InventoryTag |
Input | ElementTag |
Related Tags | <InventoryTag.title> (Property) Returns the title of the inventory. (...)
|
Description | (Property) Sets the title of the inventory.
Note that the mechanism can only be set for "generic" inventories. |
Group | Properties |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/inventory/InventoryTitle.java#L14 |
Name | trades |
Object | InventoryTag |
Input | ListTag(TradeTag) |
Related Tags | <InventoryTag.trades> (Property) Returns the trade recipe list for a merchant inventory.
|
Description | (Property) Sets the trade recipe list for a merchant inventory. |
Group | Properties |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/inventory/InventoryTrades.java#L15 |
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 | InventoryTag |
Prefix | in@ |
Base Type | ElementTag |
Implements | FlaggableObject, PropertyHolderObject |
Identity Format | The identity format for inventories is the classification type of inventory to use. All other data is specified through properties. |
Description | An InventoryTag represents an inventory, generically or attached to some in-the-world object.
Inventories can be generically designed using inventory script containers, and can be modified using the inventory command. Valid inventory type classifications: "npc", "player", "crafting", "enderchest", "workbench", "entity", "location", "generic" This object type can be noted. This object type is flaggable when it is noted. Flags on this object type will be stored in the notables.yml file. |
Matchable | InventoryTag matchers, sometimes identified as "<inventory>":
"inventory" plaintext: always matches. "note" plaintext: matches if the inventory is noted. Inventory script name: matches if the inventory comes from an inventory script of the given name, using advanced matchers. Inventory note name: matches if the inventory is noted with the given name, using advanced matchers. Inventory type: matches if the inventory is of a given type, using advanced matchers. "inventory_flagged:<flag>": a Flag Matchable for InventoryTag flags. "gui" plaintext: matches if the inventory is a GUI (see inventory script containers). |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L59 |
Name | <ElementTag.as_inventory> |
Returns | InventoryTag |
Description | Deprecated in favor of ObjectTag.as |
Generated Example |
|
Group | conversion |
Deprecated | use as[inventory] |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/bukkit/BukkitElementExtensions.java#L139 |
Name | <EntityTag.inventory> |
Returns | InventoryTag |
Description | Returns the entity's inventory, if it has one. |
Generated Example |
|
Group | inventory |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityInventory.java#L61 |
Name | <InventoryTag.anvil_max_repair_cost> |
Returns | ElementTag(Number) |
Mechanism | InventoryTag.anvil_max_repair_cost |
Description | Returns the maximum repair cost on an anvil. |
Generated Example |
|
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L2288 |
Name | <InventoryTag.anvil_rename_text> |
Returns | ElementTag |
Description | Returns the current entered renaming text on an anvil. |
Generated Example |
|
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L2302 |
Name | <InventoryTag.anvil_repair_cost> |
Returns | ElementTag(Number) |
Mechanism | InventoryTag.anvil_repair_cost |
Description | Returns the current repair cost on an anvil. |
Generated Example |
|
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L2274 |
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.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.empty_slots> |
Returns | ElementTag(Number) |
Description | Returns the number of empty slots in an inventory. |
Generated Example |
|
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L1190 |
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.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_empty_slots> |
Returns | ListTag |
Description | Returns the index of all the empty slots in an inventory. |
Generated Example |
|
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L2366 |
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.first_empty> |
Returns | ElementTag(Number) |
Description | Returns the location of the first empty slot.
Returns -1 if the inventory is full. |
Generated Example |
|
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L1851 |
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.id_holder> |
Returns | ObjectTag |
Description | Returns Denizen's holder ID for this inventory. (player object, location object, etc.) |
Generated Example |
|
Group | properties |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/inventory/InventoryHolder.java#L40 |
Name | <InventoryTag.id_type> |
Returns | ElementTag |
Description | Returns Denizen's type ID for this inventory (player, location, etc.). |
Generated Example |
|
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L1991 |
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.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.inventory_type> |
Returns | ElementTag |
Description | Returns the type of the inventory (e.g. "PLAYER", "CRAFTING", "HORSE"). |
Generated Example |
|
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L2148 |
Name | <InventoryTag.is_bossshop> |
Returns | ElementTag(Boolean) |
Description | Returns whether the inventory is a BossShop. |
Generated Example |
|
Requires | Depenizen, BossShopPro |
Source | https://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/properties/bossshop/BossShopInventoryProperties.java#L60 |
Name | <InventoryTag.is_empty> |
Returns | ElementTag(Boolean) |
Description | Returns whether the inventory is empty. |
Generated Example |
|
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L1416 |
Name | <InventoryTag.is_full> |
Returns | ElementTag(Boolean) |
Description | Returns whether the inventory is completely full. |
Generated Example |
|
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L1433 |
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.location> |
Returns | LocationTag |
Description | Returns the location of this inventory's holder. |
Generated Example |
|
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L2015 |
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.note_name> |
Returns | ElementTag |
Description | Gets the name of a noted InventoryTag. If the inventory isn't noted, this is null. |
Generated Example |
|
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L2001 |
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.recipe> |
Returns | ElementTag |
Description | Returns the recipe ID for the recipe currently formed in a crafting inventory.
Returns a list in the Namespace:Key format, for example "minecraft:stick". |
Generated Example |
|
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L2206 |
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.script> |
Returns | ScriptTag |
Description | Returns the script that this inventory came from (if any). |
Generated Example |
|
Group | properties |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/inventory/InventoryHolder.java#L51 |
Name | <InventoryTag.size> |
Returns | ElementTag(Number) |
Mechanism | InventoryTag.size |
Description | (Property) Returns the size of the inventory.
Note that the mechanism can only be set for "generic" chest inventories. |
Generated Example |
|
Group | Properties |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/inventory/InventorySize.java#L12 |
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 | <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 | <InventoryTag.title> |
Returns | ElementTag |
Mechanism | InventoryTag.title |
Description | (Property) Returns the title of the inventory.
Note that the mechanism can only be set for "generic" inventories. |
Generated Example |
|
Group | Properties |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/inventory/InventoryTitle.java#L14 |
Name | <InventoryTag.trades> |
Returns | ListTag(TradeTag) |
Mechanism | InventoryTag.trades |
Description | (Property) Returns the trade recipe list for a merchant inventory. |
Generated Example |
|
Group | Properties |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/inventory/InventoryTrades.java#L15 |
Name | <InventoryTag.viewers> |
Returns | ListTag(PlayerTag) |
Description | Returns a list of players viewing the inventory. |
Generated Example |
|
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L2350 |
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.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 | <LocationTag.has_inventory> |
Returns | ElementTag(Boolean) |
Description | Returns whether the block at the location has an inventory. |
Generated Example |
|
Group | world |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L1145 |
Name | <LocationTag.inventory> |
Returns | InventoryTag |
Description | Returns the InventoryTag of the block at the location. If the
block is not a container, returns null. |
Generated Example |
|
Group | world |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L1156 |
Name | <NPCTag.inventory> |
Returns | InventoryTag |
Description | Returns the InventoryTag of the NPC. |
Generated Example |
|
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/NPCTag.java#L917 |
Name | <PlayerTag.inventory> |
Returns | InventoryTag |
Description | Returns a InventoryTag of the player's current inventory.
Works with offline players. |
Generated Example |
|
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L1508 |
Name | <PlayerTag.open_inventory> |
Returns | InventoryTag |
Description | Gets the inventory the player currently has open. If the player has no open
inventory, this returns the player's inventory. |
Generated Example |
|
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L1534 |
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 | <EntityTag.equipment_map> |
Returns | MapTag |
Mechanism | EntityTag.equipment |
Description | Returns a MapTag containing the entity's equipment.
Output keys are boots, leggings, chestplate, helmet. 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#L93 |
Name | <EntityTag.equipment> |
Returns | ListTag(ItemTag) |
Mechanism | EntityTag.equipment |
Description | Returns a ListTag containing the entity's equipment.
Output list is boots|leggings|chestplate|helmet |
Generated Example |
|
Group | inventory |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityEquipment.java#L55 |
Name | <EntityTag.has_saddle> |
Returns | ElementTag(Boolean) |
Description | If the entity is a pig or horse, returns whether it has a saddle equipped. |
Generated Example |
|
Group | inventory |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EntityTag.java#L1420 |
Name | <EntityTag.horse_armor> |
Returns | ItemTag |
Description | If the entity is a horse, returns the item equipped as the horses armor, 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#L1406 |
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.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#L1389 |
Name | bossshop |
Syntax | bossshop [<shop name>] |
Short Description | Opens a BossShop inventory for a player. |
Full Description | Use to open up a BossShop inventory for the linked player.
Useful for rewarding players using the BossShop plugin. Shops are made with the BossShop system. |
Related Tags | <InventoryTag.is_bossshop> Returns whether the inventory is a BossShop.
|
Usage Example |
|
Group | Depenizen |
Requires | Depenizen, BossShopPro |
Source | https://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/commands/bossshop/BossShopCommand.java#L23 |
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 | OpenTrades |
Syntax | opentrades [<entity>/<trade>|...] (title:<title>) (players:<player>|...) |
Short Description | Opens the specified villager entity's trading inventory or a list of trades. |
Full Description | Forces a player to open a villager's trading inventory or a virtual trading inventory.
If an entity is specified, only one player can be specified. Otherwise, if a list of trades is specified, more than one player can be specified. If the title is not specified, no title will be applied to the virtual trading inventory. If no player is specified, by default the attached player will be forced to trade. |
Related Tags | <PlayerTag.selected_trade_index> Returns the index of the trade the player is currently viewing, if any.
<EntityTag.is_trading> Returns whether the villager entity is trading.
<EntityTag.trades> Returns a list of the Villager's trade recipes.
<EntityTag.trading_with> Returns the player who is trading with the villager entity, or null if it is not trading.
|
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/OpenTradesCommand.java#L31 |
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 | on player mends item:
on player mends brown_glazed_terracotta: after player mends item: after player mends warped_sign: |
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 | 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 | 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 | 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 | Note |
Related Guide Page | https://guide.denizenscript.com/guides/advanced/notables.html |
Syntax | note [<object>/remove] [as:<name>] |
Short Description | Adds or removes a named note of an object to the server. |
Full Description | Add or remove a 'note' to the server, persistently naming an object that can be referenced in events or scripts.
Only works for object types that are 'notable'. Noted objects are "permanent" versions of other ObjectTags. (See: ObjectTags) Noted objects keep their properties when added. Notable object types: CuboidTag, EllipsoidTag, PolygonTag, LocationTag, InventoryTag |
Related Tags | <server.notes[<type>]> Deprecated in favor of util.notes
<CuboidTag.note_name> Gets the name of a noted CuboidTag. If the cuboid isn't noted, this is null.
<EllipsoidTag.note_name> Gets the name of a noted EllipsoidTag. If the ellipsoid isn't noted, this is null.
<PolygonTag.note_name> Gets the name of a noted PolygonTag. If the polygon isn't noted, this is null.
<InventoryTag.note_name> Gets the name of a noted InventoryTag. If the inventory isn't noted, this is null.
<LocationTag.note_name> Gets the name of a noted LocationTag. If the location isn't noted, this is null.
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Synonyms (Search Aid) | notable |
Group | core |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/core/NoteCommand.java#L26 |
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 | Teleport |
Syntax | teleport (<entity>|...) [<location>] (cause:<cause>) (entity_options:<option>|...) (relative) (relative_axes:<axis>|...) (offthread_repeat:<#>) (offthread_yaw) (offthread_pitch) |
Short Description | Teleports the entity(s) to a new location. |
Full Description | Teleports the entity or entities to the new location.
Entities can be teleported between worlds using this command. You may optionally specify a teleport cause for player entities, allowing proper teleport event handling. When not specified, this is "PLUGIN". See teleport cause for causes. Instead of a valid entity, an unspawned NPC or an offline player may also be used. Optionally specify "relative" to use relative teleportation (Paper only). This is primarily useful only for players, but available for all entities. Relative teleports are smoother for the client when teleporting over short distances. Optionally, you may use "relative_axes:" to specify a set of axes to move relative on (and other axes will be treated as absolute), as any of "X", "Y", "Z", "YAW", "PITCH". Optionally, you may use "offthread_repeat:" with the relative arg when teleporting a player to smooth out the teleport with a specified number of extra async packets sent within a single tick. Optionally, specify "offthread_yaw" or "offthread_pitch" while using offthread_repeat to smooth the player's yaw/pitch to the new location's yaw/pitch. Optionally, specify additional teleport options using the 'entity_options:' arguments (Paper only). This allows things like retaining an open inventory when teleporting - see the links below for more information. See https://jd.papermc.io/paper/1.19/io/papermc/paper/entity/TeleportFlag.EntityState.html for all possible options. Note that the API this is based on is marked as experimental in Paper, and so may change in the future. |
Related Tags | <EntityTag.location> Returns the location of the entity. (...)
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Synonyms (Search Aid) | tp |
Group | entity |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/TeleportCommand.java#L39 |
Name | entity dies|death |
Event Lines | <entity> dies|death |
Triggers | when an entity dies. Note that this fires *after* the entity dies, and thus some data may be lost from the entity.
The death can only be cancelled on Paper. |
Generated Examples | on entity dies:
after entity dies: |
Has Player | when the entity that died is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Has NPC | when the entity that died is an NPC. |
Switches | by:<entity> to only process the event if the killer is known and matches the specified entity matcher.
cause:<cause> to only process the event if it was caused by a specific damage cause. |
Contexts | <context.entity> returns the EntityTag that died.
<context.damager> returns the EntityTag damaging the other entity, if any.
<context.projectile> returns the EntityTag of a projectile used to kill the entity, if one was used.
<context.message> returns an ElementTag of a player's death message.
<context.cause> returns an ElementTag of the cause of the death. See damage cause for a list of possible damage causes.
<context.drops> returns a ListTag of all pending item drops.
<context.xp> returns an ElementTag of the amount of experience to be dropped.
<context.keep_inventory> returns true if the player dying is set to keep their inventory, false if not, or null if the dying entity is not a player.
|
Determine | ElementTag to change the death message.
"NO_DROPS" to specify that any drops should be removed. "NO_XP" to specify that any XP orbs should be removed. ListTag(ItemTag) to specify new items to be dropped. ElementTag(Number) to specify the new amount of XP to be dropped. "KEEP_INV" to specify (if a player death) that the inventory should be kept. "KEEP_LEVEL" to specify (if a player death) that the XP level should be kept. "NO_MESSAGE" to hide a player death message. |
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
Group | Entity |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityDeathScriptEvent.java#L27 |
Name | entity loads crossbow |
Event Lines | <entity> loads crossbow |
Triggers | when a living entity loads a crossbow with a projectile. |
Generated Examples | on entity loads crossbow:
after cow 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#L17 |
Name | item enchanted |
Event Lines | <item> enchanted |
Triggers | when an item is enchanted. |
Generated Examples | on glass enchanted:
on 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 recipe formed |
Event Lines | <item> recipe formed |
Triggers | when an item's recipe is correctly formed. |
Generated Examples | after beetroot_soup recipe formed:
after red_concrete 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 | anvil block damaged|breaks |
Event Lines | anvil block damaged|breaks |
Triggers | when an anvil is damaged from being used. |
Generated Examples | on anvil block breaks:
after anvil block damaged: |
Switches | state:<state> to only process the event if the anvil's new damage state matches the specified state. |
Contexts | <context.state> returns an ElementTag of the anvil's new damage state. Refer to https://jd.papermc.io/paper/1.19/com/destroystokyo/paper/event/block/AnvilDamagedEvent.DamageState.html.
<context.break> returns an ElementTag(Boolean) that signifies whether the anvil will break.
<context.inventory> returns the InventoryTag of the anvil's inventory.
|
Determine | "STATE:<ElementTag>" to set the anvil's new damage state.
"BREAK:<ElementTag(Boolean)>" to set weather the anvil will break. |
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/AnvilBlockDamagedScriptEvent.java#L17 |
Name | brewing stand brews |
Event Lines | brewing stand brews |
Triggers | when a brewing stand brews a potion. |
Generated Examples | after 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 | 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 | on loot generates:
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 | 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 crafts item |
Event Lines | player crafts item
player crafts <item> |
Triggers | when a player fully crafts an item. |
Generated Examples | after player crafts item: |
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 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 | after player prepares anvil craft item:
on player prepares anvil craft hoglin_spawn_egg: |
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#L18 |
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:
on player prepares smithing red_glazed_terracotta: after player prepares smithing item: after player prepares smithing glistering_melon_slice: |
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/PlayersPrepareSmithingTableScriptEvent.java#L18 |
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: |
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 selects loom pattern |
Event Lines | player selects loom pattern |
Triggers | when a player selects a loom pattern. |
Example |
|
Example |
|
Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Switches | type:<pattern> to only process the event if the specified pattern is selected. |
Contexts | <context.loom> returns an InventoryTag of the loom.
<context.pattern> returns an ElementTag of the selected pattern. Valid pattern types can be found at: https://jd.papermc.io/paper/1.19/org/bukkit/block/banner/PatternType.html
|
Determine | "PATTERN:<ElementTag>" to set the pattern type of the loom. |
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/PlayerLoomPatternSelectScriptEvent.java#L18 |
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 smiths item |
Event Lines | player smiths item
player smiths <item> |
Triggers | when a player upgrades an item on a smithing table. |
Generated Examples | after player smiths item:
on player smiths spruce_leaves: |
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 | 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 | 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 items are primarily flagged via inventory with the 'flag' argument. Any supported object type, including the 'server' base tag, can use the tags FlaggableObject.flag, FlaggableObject.has_flag, FlaggableObject.flag_expiration, FlaggableObject.list_flags. 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. 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:
|
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 | 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#L934 |
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 | 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 | strength |
Object | EntityTag |
Input | ElementTag(Boolean) |
Related Tags | <EntityTag.strength> Returns the strength of a Llama. A llama's inventory contains (strength times three) slots. (...)
|
Description | Sets the strength of a Llama. A llama's inventory contains (strength times three) slots.
Can be from 1 to 5 (inclusive). |
Generated Example |
|
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityStrength.java#L69 |
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 | 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 | last_interacted_slot |
Object | LocationTag |
Input | ElementTag(Number) |
Related Tags | <LocationTag.last_interacted_slot> Returns the last interacted slot of a Chiseled Bookshelf inventory.
|
Description | Sets the last interacted slot of a Chiseled Bookshelf inventory. |
Generated Example |
|
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L4537 |
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 | 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#L2863 |
Name | window_property |
Object | PlayerTag |
Input | ElementTag |
Description | Sets various properties of a window the player has open, such as the open page in a lectern.
Input is of the form PROPERTY,VALUE where the value is a number. Note that any adjusted window properties are entirely clientside. Valid properties: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/InventoryView.Property.html |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L2882 |
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 | 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 | <EntityTag.strength> |
Returns | ElementTag |
Mechanism | EntityTag.strength |
Description | Returns the strength of a Llama. A llama's inventory contains (strength times three) slots.
Can be from 1 to 5 (inclusive). |
Generated Example |
|
Group | properties |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityStrength.java#L52 |
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 | <LocationTag.last_interacted_slot> |
Returns | ElementTag(Number) |
Mechanism | LocationTag.last_interacted_slot |
Description | Returns the last interacted slot of a Chiseled Bookshelf inventory. |
Generated Example |
|
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L4284 |
Name | <PlayerTag.enderchest> |
Returns | InventoryTag |
Description | Gets the player's enderchest inventory.
Works with offline players. |
Generated Example |
|
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L1519 |
Name | Equip |
Syntax | equip (<entity>|...) (hand:<item>) (offhand:<item>) (head:<item>) (chest:<item>) (legs:<item>) (boots:<item>) (saddle:<item>) (horse_armor:<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> Returns a ListTag containing the entity's equipment. (...)
<InventoryTag.equipment> Returns the equipment of an inventory as a list of items. (...)
|
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#L32 |
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> Returns a ListTag containing the entity's equipment. (...)
<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 | 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 |