Denizen Script Tags


Tags are always written with a <between these marks>, and are critical to scripts, as the primary way to read data.
Learn about how tags work in The Beginner's Guide.


Showing 10 out of 2465 tags...

Categories:

InventoryTag | LocationTag | ElementTag | ItemTag | EntityTag



Category: InventoryTag


Name<InventoryTag.contains.lore[(strict:)<element>|...]>
ReturnsElementTag(Boolean)
DescriptionReturns whether the inventory contains an item with the specified lore.
Use 'strict:' in front of the search elements to ensure all lore lines are EXACTLY the search elements,
otherwise the searching will only check if the search elements are contained in the lore.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L1575

Name<InventoryTag.contains.lore[(strict:)<element>|...].quantity[<#>]>
ReturnsElementTag(Boolean)
DescriptionReturns whether the inventory contains a certain quantity of an item with the specified lore.
Use 'strict:' in front of the search elements to ensure all lore lines are EXACTLY the search elements,
otherwise the searching will only check if the search elements are contained in the lore.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L1599

Name<InventoryTag.list_contents.with_lore[<element>]>
ReturnsListTag(ItemTag)
MechanismInventoryTag.contents
DescriptionReturns a list of all items in the inventory with the specified
lore. Color codes are ignored.
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/inventory/InventoryContents.java#L147

Name<InventoryTag.list_contents.with_lore[<element>].simple>
ReturnsListTag(ItemTag)
MechanismInventoryTag.contents
DescriptionReturns a list of all items in the inventory with the specified
lore, without item properties. Color codes are ignored.
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/inventory/InventoryContents.java#L165



Category: LocationTag


Name<LocationTag.find.unexplored_structure[<type>].within[<#.#>]>
ReturnsLocationTag
DescriptionDeprecated in favor of Tag:LocationTag.find_structure with 'unexplored=true' on 1.19+.
DeprecatedUse 'LocationTag.find_structure' with 'unexplored=true' on 1.19+.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L3100

Name<LocationTag.find_structure[structure=<structure>;radius=<#>(;unexplored=<true/{false}>)]>
ReturnsLocationTag
DescriptionFinds the closest structure of the given type within the specified chunk radius (if any), optionally only searching for unexplored ones.
For a list of default structures, see 🔗https://minecraft.wiki/w/Structure#ID.
Alternatively, you can specify a custom structure from a datapack, plugin, etc. as a namespaced key.
See also Tag:server.structures for all structures currently available on the server.
Example
# Use to find the desert temple closest to the player, and tell them what direction it's in.
- define found <player.location.find_structure[structure=desert_pyramid;radius=200].if_null[null]>
- if <[found]> != null:
  - narrate "The closet desert temple is <player.location.direction[<[found]>]> of you!"
- else:
  - narrate "No desert temple found."
Groupfinding
Warning(s)See Language:Structure lookups for potential issues/edge cases in structure lookups.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L4311



Category: ElementTag


Name<ElementTag.lines_to_colored_list>
ReturnsListTag
DescriptionReturns a list of lines in the element, with colors spread over the lines manually.
Useful for things like item lore.
Generated Example
- foreach <element[hello_world].lines_to_colored_list> as:entry:
    - narrate "found <[entry]>"
Groupelement manipulation
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/bukkit/BukkitElementExtensions.java#L317



Category: ItemTag


Name<ItemTag.has_lore>
ReturnsElementTag(Boolean)
MechanismItemTag.lore
DescriptionReturns whether the item has lore set on it.
Generated Example
- if <player.item_in_hand.has_lore>:
    - narrate "it was true!"
- else:
    - narrate "it was false!"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemLore.java#L71

Name<ItemTag.lore>
ReturnsListTag
MechanismItemTag.lore
DescriptionReturns lore as a ListTag.
Generated Example
- foreach <player.item_in_hand.lore> as:entry:
    - narrate "found <[entry]>"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemLore.java#L57



Category: EntityTag


Name<EntityTag.explored_locations>
ReturnsListTag(LocationTag)
MechanismEntityTag.explored_locations
Description(Property) Returns a sniffer's explored locations.
Generated Example
- foreach <player.explored_locations> as:entry:
    - narrate "found <[entry]>"
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityExploredLocations.java#L11