Denizen Script Meta Documentation Search


Learn about how Denizen works in The Beginner's Guide.
Showing 101 search results for flag out of 3906 meta-documentation entries...

Perfect Name Match Results



Command


NameFlag
Related Guide Pagehttps://guide.denizenscript.com/guides/basics/flags.html
Syntaxflag [<object>|...] [<name>([<#>])](:<action>)[:<value>] (expire:<time>)
Short DescriptionSets or modifies a flag on any flaggable object.
Full DescriptionThe flag command sets or modifies custom data values stored on any flaggable object (the server, a player/NPC/entity, a block location, ...).
See also Language:flag system.

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

Flags by default are added permanently (or for the lifetime of the object they're attached to).
You can optionally specify a system time the flag will expire at, using either a DurationTag or a TimeTag.
If a DurationTag is used, it will be equivalent to: <util.time_now.add[<your_duration_here>]>
Related Tags<FlaggableObject.flag[<flag_name>]> Returns the specified flag from the flaggable object. (...)
<FlaggableObject.has_flag[<flag_name>]> Returns true if the flaggable object has the specified flag, otherwise returns false. (...)
<FlaggableObject.flag_expiration[<flag_name>]> Returns a TimeTag indicating when the specified flag will expire. (...)
<FlaggableObject.list_flags> Returns a list of the flaggable object's flags. (...)
<server.online_players_flagged[<flag_name>]> Returns a list of all online players with a specified flag set. (...)
<server.players_flagged[<flag_name>]> Returns a list of all players (online or offline) with a specified flag set. (...)
<server.spawned_npcs_flagged[<flag_name>]> Returns a list of all spawned NPCs with a specified flag set. (...)
<server.npcs_flagged[<flag_name>]> Returns a list of all NPCs with a specified flag set. (...)
Usage Example
# Use to create or set a flag on a player.
- flag <player> playstyle:aggressive
Usage Example
# Use to set a temporary flag for five minutes on a player.
- flag <player> just_did_something expire:5m
Usage Example
# Use to flag an npc with a given tag value.
- flag <npc> location:<npc.location>
Usage Example
# Use to apply mathematical changes to a flag's value on a unique object.
- flag <context.damager> damage_dealt:+:<context.damage>
Usage Example
# Use to add an item to a server flag as a new value without removing existing values.
- flag server cool_people:->:<[player]>
Usage Example
# Use to add multiple items as individual new values to a server flag that is already a list.
- flag server cool_people:|:<[player]>|<[someplayer]>
Usage Example
# Use to remove an entry from a server flag.
- flag server cool_people:<-:<[someplayer]>
Usage Example
# Use to completely remove a flag.
- flag server cool_people:!
Usage Example
# Use to modify a specific index in a list flag.
- flag server myflag[3]:HelloWorld
Groupcore
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/core/FlagCommand.java#L88

Mechanism


Nameflag
ObjectItemTag
InputObjectTag
Related Tags<FlaggableObject.flag[<flag_name>]> Returns the specified flag from the flaggable object. (...)
<FlaggableObject.has_flag[<flag_name>]> Returns true if the flaggable object has the specified flag, otherwise returns false. (...)
<FlaggableObject.flag_expiration[<flag_name>]> Returns a TimeTag indicating when the specified flag will expire. (...)
<FlaggableObject.list_flags> Returns a list of the flaggable object's flags. (...)
DescriptionModifies a flag on this item, using syntax similar to Command:flag.
For example, 'flag:myflagname:!' will remove flag 'myflagname', or 'flag:myflagname:3' sets flag 'myflagname' to value '3'.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemFlags.java#L119

Partial Name Match Results



Language


NameFlag System
DescriptionThe flag system is a core feature of Denizen, that allows for persistent data storage linked to objects.

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

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

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

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

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

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

Most flag sets are handled by Command:flag, however items are primarily flagged via Command:inventory with the 'flag' argument.
Any supported object type, including the 'server' base tag, can use the tags
Tag:FlaggableObject.flag, Tag:FlaggableObject.has_flag, Tag:FlaggableObject.flag_expiration, Tag:FlaggableObject.list_flags.

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

Note that some internal flags exist, and are prefixed with '__' to avoid conflict with normal user flags.
This includes:
- '__raw' and '__clear' which are part of a fake-flag system used for forcibly setting raw data to a flaggable object,
- '__scripts', '__time', etc. which is where some object-type flags are stored inside of server flags,
- '__interact_step' which is used for interact script steps, related to Command:zap,
- '__interact_cooldown' which is used for interact script cooldowns, related to Command:cooldown.

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

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

# Gather the original data
- define playerdata <player.flag_map[flag1|flag2|taco|potato|waffle|etc]>
# Now reapply it elsewhere (eg a different Bungee server)
- flag <player> __raw:<[playerdata]>
GroupDenizen Scripting Language
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/core/FlagCommand.java#L34

Mechanism


Nameflag_map
ObjectEntityTag
InputMapTag
DescriptionInternal setter for the EntityTag flag map.
Do not use this in scripts.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityFlags.java#L73
Nameclean_flags
ObjectFlaggableObject
InputNone
DescriptionCleans any expired flags from the object.
Generally doesn't need to be called, using the 'skip flag cleanings' setting was enabled.
This is an internal/special case mechanism, and should be avoided where possible.
Does not function on all flaggable objects, particularly those that just store their flags into other objects.
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/flags/AbstractFlagTracker.java#L123
Nameflag_map
ObjectItemTag
InputMapTag
DescriptionInternal-usage direct re-setter for the item's full raw flag data.
DeprecatedInternal-usage only.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemFlags.java#L107
Nameclean_flags
Objectserver
InputNone
DescriptionCleans any expired flags from the object.
Generally doesn't need to be called, using the 'skip flag cleanings' setting was enabled.
This is an internal/special case mechanism, and should be avoided where possible.
Does not function on all flaggable objects, particularly those that just store their flags into other objects.
Generated Example
- adjust server clean_flags
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L1876

ObjectType


NameFlaggableObject
PrefixNone
Identity FormatN/A
Description"FlaggableObject" is a pseudo-ObjectType that represents any type of object that can hold flags,
for use with Command:flag or any other flag related tags and mechanisms.

Just because an ObjectType implements FlaggableObject, does not mean a specific instance of that object type is flaggable.
For example, LocationTag implements FlaggableObject, but a LocationTag-Vector (a location without a world) cannot hold a flag.
Extended ByGriefPreventionClaimTag, NationTag, TownTag, DiscordBotTag, DiscordChannelTag, DiscordCommandTag, DiscordGroupTag, DiscordInteractionTag, DiscordMessageTag, DiscordReactionTag, DiscordRoleTag, DiscordUserTag, BiomeTag, ChunkTag, CuboidTag, EllipsoidTag, EnchantmentTag, EntityTag, InventoryTag, ItemTag, LocationTag, MaterialTag, NPCTag, PlayerTag, PluginTag, PolygonTag, WorldTag, QueueTag, ScriptTag, TimeTag
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/flags/FlaggableObject.java#L7

Tag


Name<AreaObject.blocks_flagged[<flag_name>]>
ReturnsListTag(LocationTag)
DescriptionGets a list of all block locations with a specified flag within the area.
Searches the internal flag lists, rather than through all possible blocks.
Example
# Spawns a debugblock to highlight every block in the cuboid that has the location flag 'my_flag'.
- debugblock <cuboid[my_cuboid].blocks_flagged[my_flag]>
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/AreaContainmentObject.java#L265
Name<ChunkTag.blocks_flagged[<flag_name>]>
ReturnsListTag(LocationTag)
DescriptionGets a list of all block locations with a specified flag within the CuboidTag.
Searches the internal flag lists, rather than through all possible blocks.
Example
# Spawns a debugblock to highlight every block in the chunk flagged "my_flag"
- debugblock <player.location.chunk.blocks_flagged[my_flag]>
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/ChunkTag.java#L716
Name<FlaggableObject.flag_expiration[<flag_name>]>
ReturnsTimeTag
DescriptionReturns a TimeTag indicating when the specified flag will expire.
See Language:flag system.
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/flags/AbstractFlagTracker.java#L71
Name<FlaggableObject.flag_map[<name>|...]>
ReturnsMapTag
DescriptionReturns a raw map of the objects internal flag data for the flags with the given flag name. Names must be root names (no '.').
Output is a MapTag wherein each key is a flag name, and each value is a MapTag, containing keys '__value' and '__expiration', where '__value' contains the real object value.
Output also may contain key '__clear', which is a ListTag of flags that were listed in input but weren't present in output.
Using this without a parameter to get ALL flags is allowed exclusively for debug/testing reasons, and should never be used in a real script.
See Language:flag system.
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/flags/AbstractFlagTracker.java#L104
Name<FlaggableObject.flag[<flag_name>]>
ReturnsObjectTag
DescriptionReturns the specified flag from the flaggable object.
If the flag is expired, will return null.
Consider also using Tag:FlaggableObject.has_flag.
See Language:flag system.
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/flags/AbstractFlagTracker.java#L37
Name<FlaggableObject.has_flag[<flag_name>]>
ReturnsElementTag(Boolean)
DescriptionReturns true if the flaggable object has the specified flag, otherwise returns false.
See Language:flag system.
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/flags/AbstractFlagTracker.java#L55
Name<FlaggableObject.list_flags>
ReturnsListTag
DescriptionReturns a list of the flaggable object's flags.
Note that this is exclusively for debug/testing reasons, and should never be used in a real script.
See Language:flag system.
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/flags/AbstractFlagTracker.java#L87
Name<ItemTag.with_flag[<flag_set_action>].duration[<expire_duration>]>
ReturnsItemTag
MechanismItemTag.flag
DescriptionReturns a copy of the item with the specified flag data action (and the specified expiration duration) applied to it.
For example: <[item].with_flag[myflagname].duration[5m]>
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemFlags.java#L68
Name<ItemTag.with_flag[<flag_set_action>]>
ReturnsItemTag
MechanismItemTag.flag
DescriptionReturns a copy of the item with the specified flag data action applied to it.
For example: <[item].with_flag[myflagname]>, or <[item].with_flag[myflag:myvalue]>, or <[item].with_flag[mycounter:+:<[amount]>]>
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemFlags.java#L53
Name<LocationTag.find_blocks_flagged[<flag_name>].within[<#>]>
ReturnsListTag(LocationTag)
DescriptionReturns a list of blocks that have the specified flag within a radius.
Note: current implementation measures the center of nearby block's distance from the exact given location.
Result list is sorted by closeness (1 = closest, 2 = next closest, ... last = farthest).
Searches the internal flag lists, rather than through all possible blocks.
Groupfinding
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L2608
Name<PlayerTag.worldguard_flag[flag=<flag>(;location=<at>)]>
ReturnsObjectTag
DescriptionReturns the boolean state of a flag for that player at the specified location, defaults to player location.
For non-state tags, returns the current value of the flag.
Example
# Returns 'true' if the player can be attacked (according to WG) or 'false' if not.
- narrate <player.worldguard_flag[flag=pvp]>
RequiresDepenizen, WorldGuard
Sourcehttps://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/properties/worldguard/WorldGuardPlayerExtensions.java#L110
Name<PlayerTag.worldguard.test_flag[<name>].at[<location>]>
ReturnsObjectTag
DescriptionDeprecated in favor of Tag:PlayerTag.worldguard_flag
RequiresDepenizen, WorldGuard
DeprecatedUse 'PlayerTag.worldguard_flag'
Sourcehttps://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/properties/worldguard/WorldGuardPlayerExtensions.java#L70
Name<PlayerTag.worldguard.test_flag[<name>]>
ReturnsObjectTag
DescriptionDeprecated in favor of Tag:PlayerTag.worldguard_flag
RequiresDepenizen, WorldGuard
DeprecatedUse 'PlayerTag.worldguard_flag'
Sourcehttps://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/properties/worldguard/WorldGuardPlayerExtensions.java#L51
Name<server.flag_expiration[<flag_name>]>
ReturnsTimeTag
DescriptionSee Tag:FlaggableObject.flag_expiration
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L596
Name<server.flag_map[<name>|...]>
ReturnsMapTag
DescriptionSee Tag:FlaggableObject.flag_map
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L625
Name<server.flag[<flag_name>]>
ReturnsObjectTag
DescriptionSee Tag:FlaggableObject.flag
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L605
Name<server.has_flag[<flag_name>]>
ReturnsElementTag(Boolean)
DescriptionSee Tag:FlaggableObject.has_flag
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L586
Name<server.list_flags>
ReturnsListTag
DescriptionSee Tag:FlaggableObject.list_flags
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L615
Name<server.npcs_flagged[<flag_name>]>
ReturnsListTag(NPCTag)
DescriptionReturns a list of all NPCs with a specified flag set.
Can use "!<flag_name>" style to only return NPCs *without* the flag.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L2360
Name<server.online_players_flagged[<flag_name>]>
ReturnsListTag(PlayerTag)
DescriptionReturns a list of all online players with a specified flag set.
Can use "!<flag_name>" style to only return players *without* the flag.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L1302
Name<server.players_flagged[<flag_name>]>
ReturnsListTag(PlayerTag)
DescriptionReturns a list of all players (online or offline) with a specified flag set.
Warning: this will cause the player flag cache to temporarily fill with ALL historical playerdata.
Can use "!<flag_name>" style to only return players *without* the flag.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L1327
Name<server.spawned_npcs_flagged[<flag_name>]>
ReturnsListTag(NPCTag)
DescriptionReturns a list of all spawned NPCs with a specified flag set.
Can use "!<flag_name>" style to only return NPCs *without* the flag.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L2335

Semi-Strong Match Results



Action


Action Linesmob move proximity
<entity> move proximity
Triggerswhen a mob moves in the proximity of the NPC (Requires MobProx trait).
(Fires at a rate of specified by the 'mobprox_timer' flag, default of 2 seconds)
Contexts<context.entity> returns the mob that entered the proximity
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/npc/traits/MobproxTrait.java#L90

Semi-Decent Match Results



Command


NameAnnounce
Syntaxannounce [<text>] (to_ops/to_console/to_flagged:<flag_name>/to_permission:<node>) (format:<script>)
Short DescriptionAnnounces a message for everyone online to read.
Full DescriptionAnnounce sends a raw message to players.
Simply using announce with text will send the message to all online players using the Spigot broadcast system.
Specifying the 'to_ops' argument will narrow down the players in which the message is sent to ops only.
Alternatively, using the 'to_permission' argument will send the message to only players that have the specified permission node.
Or, using the 'to_flagged' argument will send the message to only players that have the specified flag.
You can also use the 'to_console' argument to make it so it only shows in the server console.

You can format the announcement with Language:Format Script Containers using the 'format' argument, or with the "announce" format type (see Language:Script Formats).

Note that the default announce mode (that shows for all players) relies on the Spigot broadcast system, which requires the permission "bukkit.broadcast.user" to see broadcasts.
Related TagsNone
Usage Example
# Use to send an important message to your players.
- announce 'Warning! This server will restart in 5 minutes!'
Usage Example
# Use to send a message to a specific 'group' of players.
- announce to_flagged:clan_subang '[<player.name>] Best clan ever!'
Usage Example
# Use to easily send a message to all online ops.
- announce to_ops '<player.name> requires help!'
Usage Example
# Use to send a message to just the console (Primarily for debugging / logging).
- announce to_console 'Warning- <player.name> broke a mob spawner at location <player.location>'
Groupserver
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/server/AnnounceCommand.java#L31
NameDefine
Related Guide Pagehttps://guide.denizenscript.com/guides/basics/definitions.html
Syntaxdefine [<id>](:<action>)[:<value>]
Short DescriptionCreates a temporary variable inside a script queue.
Full DescriptionDefinitions are queue-level 'variables' that can be used throughout a script, once defined, by using the <[<id>]> tag.
Definitions are only valid on the current queue and are not transferred to any new queues constructed within the script,
such as by a 'run' command, without explicitly specifying to do so.

Definitions are lighter and faster than creating a temporary flag.
Definitions are also automatically removed when the queue is completed, so there is no worry for leaving unused data hanging around.

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

Definitions can be sub-mapped with the '.' character, meaning a def named 'x.y.z' is actually a def 'x' as a MapTag with key 'y' as a MapTag with key 'z' as the final defined value.
In other words, "<[a.b.c]>" is equivalent to "<[a].get[b].get[c]>"
Related Tags<[<id>]> to get the value assigned to an ID
<QueueTag.definition[<definition>]> Returns the value of the specified definition. (...)
<QueueTag.definitions> Returns the names of all definitions that were added to the current queue.
Usage Example
# Use to make complex tags look less complex, and scripts more readable.
- narrate "You invoke your power of notice..."
- define range <player.flag[range_level].mul[3]>
- define blocks <player.flag[noticeable_blocks]>
- define count <player.location.find_blocks[<[blocks]>].within[<[range]>].size>
- narrate "<&[base]>[NOTICE] You have noticed <[count].custom_color[emphasis]> blocks in the area that may be of interest."
Usage Example
# Use to validate a player input to a command script, and then output the found player's name.
- define target <server.match_player[<context.args.get[1]>]||null>
- if <[target]> == null:
  - narrate "<red>Unknown player target."
  - stop
- narrate "You targeted <[target].name>!"
Usage Example
# Use to keep the value of a tag that you might use many times within a single script.
- define arg1 <context.args.get[1]>
- if <[arg1]> == hello:
    - narrate Hello!
- else if <[arg1]> == goodbye:
    - narrate Goodbye!
Usage Example
# Use to remove a definition.
- define myDef:!
Usage Example
# Use to make a MapTag definition and set the value of a key inside.
- define myroot.mykey MyValue
- define myroot.myotherkey MyOtherValue
- narrate "The main value is <[myroot.mykey]>, and the map's available key set is <[myroot].keys>"
Synonyms (Search Aid)definition
Groupqueue
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/queue/DefineCommand.java#L27
NameInventory
Syntaxinventory [open/close/copy/move/swap/set/keep/exclude/fill/clear/update/adjust <mechanism>:<value>/flag <name>(:<action>)[:<value>] (expire:<time>)] (destination:<inventory>) (origin:<inventory>/<item>|...) (slot:<slot>)
Short DescriptionEdits the inventory of a player, NPC, or chest.
Full DescriptionUse this command to edit the state of inventories.
By default, the destination inventory is the current attached player's inventory.

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

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

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

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

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

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

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

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

The slot argument can be any valid slot, see Language:Slot Inputs.
Related Tags<PlayerTag.inventory> Returns a InventoryTag of the player's current inventory. (...)
<PlayerTag.enderchest> Gets the player's enderchest inventory. (...)
<PlayerTag.open_inventory> Gets the inventory the player currently has open. If the player has no open (...)
<NPCTag.inventory> Returns the InventoryTag of the NPC.
<LocationTag.inventory> Returns the InventoryTag of the block at the location. If the (...)
Usage Example
# Use to open a chest inventory, at a location.
- inventory open d:<context.location>
Usage Example
# Use to open a virtual inventory with a title and some items.
- inventory open d:generic[size=27;title=BestInventory;contents=snowball|stick]
Usage Example
# Use to open another player's inventory.
- inventory open d:<[player].inventory>
Usage Example
# Use to remove all items from a chest, except any items in the specified list.
- inventory keep d:<context.location.inventory> o:snowball|ItemScript
Usage Example
# Use to remove all sticks and stones from the player's inventory.
- inventory exclude origin:stick|stone
Usage Example
# Use to clear the player's inventory entirely.
- inventory clear
Usage Example
# Use to swap two players' inventories.
- inventory swap d:<[playerOne].inventory> o:<[playerTwo].inventory>
Usage Example
# Use to adjust a specific item in the player's inventory.
- inventory adjust slot:5 "lore:Item modified!"
Usage Example
# Use to set a single stick into slot 10 of the player's inventory.
- inventory set o:stick slot:10
Usage Example
# Use to set a temporary flag on the player's held item.
- inventory flag slot:hand my_target:<player.cursor_on> expire:1d
Groupitem
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/item/InventoryCommand.java#L95
NameMongo
Syntaxmongo [id:<ID>] [connect:<uri> database:<database> collection:<collection>/disconnect/command:<map>/find:<map> (by_id:<id>)/insert:<map>/update:<update> new:<new> (upsert:true/{false})/use_database:<database>/use_collection:<collection>]
Short DescriptionInteracts with a MongoDB server.
Full DescriptionThis command is used to interact with a MongoDB server.

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

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

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

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

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

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

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

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

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

Progress can be a number between 1 and 100 or 'health' to make it track the NPC's health.
Placeholder API/Citizens placeholders are supported.

Optionally specify a range around the NPC where the bossbar is visible, and/or a permission required to view it.
Input an empty view permission to remove it ('view_permission:').

Valid colors: 🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/boss/BarColor.html.
Valid styles: 🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/boss/BarStyle.html.
Valid options: 🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/boss/BarFlag.html.
Usage Example
# Makes the linked NPC's bossbar green, and changes its title.
- npcbossbar color:green "title:This bossbar is green!"
Usage Example
# Makes it so the linked NPC's bossbar can only be visible 5 blocks away from it.
- npcbossbar range:5
Usage Example
# Removes a specific NPC's bossbar.
- npcbossbar remove npc:<[theNPC]>
Groupnpc
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/npc/NPCBossBarCommand.java#L29
NameSchematic
Syntaxschematic [create/load/unload/rotate/save/flip_x/flip_y/flip_z/paste (fake_to:<player>|... fake_duration:<duration>) (noair) (mask:<material_matcher>)] [name:<name>] (filename:<name>) (angle:<#>) (<location>) (area:<area>) (delayed) (max_delay_ms:<#>) (entities) (flags)
Short DescriptionCreates, loads, pastes, and saves schematics (Sets of blocks).
Full DescriptionCreates, loads, pastes, and saves schematics. Schematics are files containing info about blocks and the order of those blocks.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

To delete a schematic file, use Mechanism:server.delete_file.
Related Tags<schematic[<name>].height> Returns the height (Y) of the schematic.
<schematic[<name>].length> Returns the length (Z) of the schematic.
<schematic[<name>].width> Returns the width (X) of the schematic.
<schematic[<name>].block[<location>]> Returns the material for the block at the location in the schematic. (...)
<schematic[<name>].origin> Returns the origin location of the schematic.
<schematic[<name>].blocks> Returns the number of blocks in the schematic.
<schematic[<name>].exists> Returns whether the schematic exists.
<schematic[<name>].cuboid[<origin_location>]> Returns a cuboid of where the schematic would be if it was pasted at an origin.
<schematic.list> Returns a list of all loaded schematics.
Usage Example
# Use to create a new schematic from a cuboid and an origin location.
- schematic create name:MySchematic area:<[my_cuboid]> <player.location>
Usage Example
# Use to load a schematic.
- ~schematic load name:MySchematic
Usage Example
# Use to unload a schematic.
- schematic unload name:MySchematic
Usage Example
# Use to paste a loaded schematic with no air blocks.
- schematic paste name:MySchematic <player.location> noair
Usage Example
# Use to save a created schematic.
- ~schematic save name:MySchematic
Groupworld
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/world/SchematicCommand.java#L58
NameSQL
Syntaxsql [id:<ID>] [disconnect/connect:<server> (username:<username>) (password:<secret>) (ssl:true/{false})/query:<query>/update:<update>]
Short DescriptionInteracts with a MySQL server.
Full DescriptionThis command is used to interact with a MySQL server. It can update the database or query it for information.

This commands exists primarily for interoperability with pre-existing databases and external services.
It should never be used for storing data that only Denizen needs to use. Consider instead using Command:flag.

The general usage order is connect -> update/query -> disconnect.
It is not required that you disconnect right after using, and in fact encouraged that you keep a connection open where possible.

When connecting, the server format is IP:Port/Database, EG 'localhost:3306/test'.
You can also append options to the end, like 'localhost:3306/test?autoReconnect=true'
Store your password in the Denizen secrets file at 'plugins/Denizen/secrets.secret'. Refer to ObjectType:SecretTag for usage info.

You can switch whether SSL is used for the connection (defaults to false).

Note that when using tag, it is recommended you escape unusual inputs to avoid SQL injection.

The SQL command is merely a wrapper for SQL queries, and further usage details should be gathered from an official MySQL query reference rather than from Denizen command help.

SQL connections are not instant - they can take several seconds, or just never connect at all.
It is recommended you hold the command by doing "- ~sql ..." rather than just "- sql ..."
as this will delay the commands following the SQL command until after the SQL operation is complete.

If you have an SQL database server other than MySQL, be sure to include the driver prefix (defaults to "mysql://" when unspecified).
Related Tags<entry[saveName].result_list> returns a ListTag with (for each row retrieved) another ListTag. So if you would want to get the second column of the first row, you'd use <entry[saveName].result_list.get[1].get[2]>.
<entry[saveName].result_map> returns a ListTag with (for each row retrieved) a MapTag. So for example <entry[saveName].result_map.get[1].get[UUID]> for the UUID column of the first row.
<entry[saveName].affected_rows> returns how many rows were affected by an update command.
<util.sql_connections> Returns a list of all SQL connections opened by Command:sql.
Usage Example
# Use to connect to an SQL server.
- ~sql id:name connect:localhost:3306/test username:space password:<secret[sql_pw]>
Usage Example
# Use to connect to an SQL server over an SSL connection.
- ~sql id:name connect:localhost:3306/test username:space password:<secret[sql_pw]> ssl:true
Usage Example
# Use to connect to an SQL server with a UTF8 text encoding.
- ~sql id:name connect:localhost:3306/test?characterEncoding=utf8 username:space password:<secret[sql_pw]>
Usage Example
# Use to update an SQL server.
- ~sql id:name "update:CREATE table things(id int,column_name1 varchar(255),column_name2 varchar(255));"
Usage Example
# Use to update an SQL server.
- ~sql id:name "update:INSERT INTO things VALUES (3, 'hello', 'space');"
Usage Example
# Use to query an SQL server.
- ~sql id:name "query:SELECT id,column_name1,column_name2 FROM things;" save:saveName
- narrate <entry[saveName].result_list>
Usage Example
# Use to query an SQL server.
- ~sql id:name "query:SELECT id,column_name1,column_name2 FROM things WHERE id=3;" save:saveName2
- narrate <entry[saveName2].result_list>
Usage Example
# Use to disconnect from an SQL server.
- sql disconnect id:name
Groupcore
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/core/SQLCommand.java#L35
NameTake
Syntaxtake [iteminhand/cursoritem/bydisplay:<name>/bycover:<title>|<author>/slot:<slot>/flagged:<flag>/item:<matcher>] (quantity:<#>) (from:<inventory>)
Short DescriptionTakes an item from the player.
Full DescriptionTakes items from a player or inventory.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

To take xp from a player, use Command:experience.
To take money from a player, use Command:money.
Related Tags<PlayerTag.item_in_hand> Returns the item the entity is holding, or air if none.
Usage Example
# Use to take an arrow from the player's enderchest
- take item:arrow from:<player.enderchest>
Usage Example
# Use to take the current holding item from the player's hand
- take iteminhand
Usage Example
# Use to take 5 emeralds from the player's inventory
- take item:emerald quantity:5
Groupitem
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/item/TakeCommand.java#L41
NameTeleport
Syntaxteleport (<entity>|...) [<location>] (cause:<cause>) (entity_options:<option>|...) (relative) (relative_axes:<axis>|...) (offthread_repeat:<#>) (offthread_yaw) (offthread_pitch)
Short DescriptionTeleports the entity(s) to a new location.
Full DescriptionTeleports 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 Language: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
# Use to teleport a player to the location their cursor is pointing at.
- teleport <player> <player.cursor_on>
Usage Example
# Use to teleport a player high above.
- teleport <player> <player.location.above[200]>
Usage Example
# Use to teleport to a random online player.
- teleport <player> <server.online_players.random.location>
Usage Example
# Use to teleport all players to your location.
- teleport <server.online_players> <player.location>
Usage Example
# Use to teleport the NPC to a location that was noted with the <@link command note> command.
- teleport <npc> my_prenoted_location
Usage Example
# Use to teleport a player to some location, and inform events that it was caused by a nether portal.
- teleport <player> <server.flag[nether_hub_location]> cause:nether_portal
Usage Example
# Use to teleport the player without closing their currently open inventory.
- teleport <player> <player.location.below[5]> entity_options:retain_open_inventory
Synonyms (Search Aid)tp
Groupentity
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/TeleportCommand.java#L39
NameYaml
Syntaxyaml [create]/[load:<file>]/[loadtext:<text> raw_format]/[unload]/[savefile:<file>]/[copykey:<source_key> <target_key> (to_id:<name>)]/[set <key>([<#>])(:<action>):<value> (data_type:{string}/integer/double/boolean/auto)] [id:<name>]
Short DescriptionEdits YAML data, especially for YAML files.
Full DescriptionEdits YAML configuration data.

This commands exists primarily for interoperability with pre-existing data files and other plugins.
It should never be used for storing data that only Denizen needs to use. Consider instead using Command:flag.

Use waitable syntax ("- ~yaml load:...") with load or savefile actions to avoid locking up the server during file IO.
Refer to Language:~waitable.

For loading and saving, the starting path is within 'plugins/Denizen'.
The file path follows standard system file path rules. That means '/' separators folders,
and '..' as a folder name means go-up-one folder, for example '../WorldGuard/config.yml' would load the WorldGuard plugin config.
Also be aware that some servers (Linux/Mac based) have case sensitive file systems while others (Windows based) don't.
Generally, when using existing paths, make sure your casing is correct. When creating new paths, prefer all-lowercase to reduce risk of issues.

Please note that all usages of the YAML command except for "load" and "savefile" arguments are purely in memory.
That means, if you use "set" to make changes, those changes will not be saved to any file, until you use "savefile".
Similarly, "create" does not create any file, instead it only creates a YAML object in RAM.

When loading, optionally specify 'raw_format' to indicate that this YAML file needs to maintain compatibility with some external system using raw YAML data
(for example, when altering YAML data files used by external plugins).
Note that this can have side effects of custom data disappearing (for example, the value "yes" gets magically converted to "true") or strange data parsing in.

In-memory changes to a loaded YAML object will mark that object as having changes. Before saving,
you can check whether the YAML object needs to be written to disk with the has_changes tag.

Note that the '.yml' extension is not automatically appended, and you will have to include that in filenames.

All usages of the YAML command must include the "id:" argument. This is any arbitrary name, as plaintext or from a tag,
to uniquely and globally identify the YAML object in memory. This ID can only be used by one YAML object at a time.
IDs are stored when "create" or "load" arguments are used, and only removed when "unload" is used.
If, for example, you have a unique YAML data container per-player, you might use something like "id:myscript_<player>".

For ways to use the "set" argument, refer to Language:data actions.

When setting a value directly, you can optionally specify "data_type" as "string", "integer", "double", "boolean", or "auto",
to force the input to a specific data type, which may be needed for compatibility with some external YAML files.
Only applicable when setting a single value, not lists/maps/etc.
'Auto' will attempt to choose the best type for the value.
Related Tags<yaml[<idname>].contains[<path>]> Returns true if the file has the specified path. (...)
<yaml[<idname>].read[<path>]> Returns the value from a data key on the YAML document as an ElementTag, ListTag, or MapTag.
<yaml[<idname>].list_keys[<path>]> Returns a ListTag of all the keys at the path (and not sub-keys). (...)
<yaml[<idname>].has_changes> Returns whether this YAML object has had changes since the last save or load.
Usage Example
# Use to create a new YAML file.
- yaml create id:myfile
Usage Example
# Use to load a YAML file from disk.
- ~yaml load:myfile.yml id:myfile
Usage Example
# Use to modify a YAML file similarly to a flag.
- yaml id:myfile set my.key:HelloWorld
Usage Example
# Use to save a YAML file to disk.
- ~yaml savefile:myfile.yml id:myfile
Usage Example
# Use to unload a YAML file from memory.
- yaml unload id:myfile
Usage Example
# Use to modify a YAML file similarly to a flag.
- yaml id:myfile set my.key:+:2
Usage Example
# Use to modify a YAML file similarly to a flag.
- yaml id:myfile set my.key[2]:hello
Usage Example
# Use to modify a copy the contents of one YAML key to a new owning key.
- yaml id:myfile copykey:my.first.key my.new.key
Usage Example
# Use to modify a copy the contents of one YAML key to a new owning key on a different YAML file.
- yaml id:myfile copykey:my.first.key my.new.key to_id:myotherfile
Groupfile
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/file/YamlCommand.java#L44

Language


Name/ex command
DescriptionThe '/ex' command is an easy way to run a single denizen script command in-game.
'Ex' is short for 'Execute'.
Its syntax, aside from '/ex' is exactly the same as any other Denizen script command.
When running a command, some context is also supplied, such as '<player>' if being run by a player (versus the console),
as well as '<npc>' if a NPC is selected by using the '/npc sel' command.

By default, ex command debug output is sent to the player that ran the ex command (if the command was ran by a player).
To avoid this, use '-q' at the start of the ex command.
Like: /ex -q narrate "wow no output"

The '/ex' command creates a new queue each time it's run,
meaning for example '/ex define' would do nothing, as the definition will be lost immediately.

If you need to sustain a queue between multiple executions, use '/exs' ("Execute Sustained").
A sustained queue will use the same queue on every execution until the queue stops (normally due to '/exs stop').
Be warned that waits will block the sustained queue - eg '/exs wait 10m' will make '/exs' effectively unusable for 10 minutes.

Examples:
/ex flag <player> test_flag:!
/ex run npc_walk_script

Need to '/ex' a command as a different player or NPC? Use Language:The Player and NPC Arguments.

Examples:
/ex narrate player:<[aplayer]> 'Your health is <player.health.formatted>.'
/ex walk npc:<[some_npc]> <player.cursor_on>
GroupConsole Commands
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/utilities/command/ExCommandHandler.java#L34
NameAdvanced Object Matchables
DescriptionScript events have a variety of matchable object inputs, and the range of inputs they accept may not always be obvious.
For example, an event might be "player clicks <block>"... what can "<block>" be filled with?

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

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

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

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

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

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

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

As a special case, "in:<area>" style matchable listings in event conform to the following option set:
"biome:<name>": matches if the location is in a given biome, using advanced matchers.
"cuboid" plaintext: matches if the location is in any noted cuboid.
"ellipsoid" plaintext: matches if the location is in any noted ellipsoid.
"polygon" plaintext: matches if the location is in any noted polygon.
"chunk_flagged:<flag>": a Flag Matchable for ChunkTag flags.
"area_flagged:<flag>": a Flag Matchable for AreaObject flags.
Area note name: matches if an AreaObject note that matches the given advanced matcher contains the location.
If none of the above are used, uses WorldTag matchers.
GroupObject System
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/BukkitScriptEvent.java#L45
NameAssignment Script Containers
DescriptionAssignment script-containers provide functionality to NPCs by 'assignment' of the container. Assignment
scripts are meant to be used when customizing the normal behavior of NPCs. This can be used on a 'per-NPC' basis,
but the encouraged approach is to design assignment scripts in a way that they can be used for multiple NPCs,
perhaps with the use of constants or flags to determine specific information required by the scripts.

Features unique to assignment script-containers include 'actions' and 'interact script' assignment.
Like any script, the ability to run local utility scripts can be accomplished as well. This allows fully
interactive NPCs to be built purely with Assignment Scripts, and for advanced situations, world scripts and
interact scripts can provide more functionality.
See also Language:interact script containers

Assignments scripts can be automatically disabled by adding "enabled: false" as a root key (supports any load-time-parseable tags).
This will disable any "actions" on the script (but not interact scripts steps - disable the interact for that).

Basic structure of an assignment script:

Assignment_Script_Name:

    type: assignment

    # | All assignment scripts MUST have this key!
    actions:
        on <action>:
        - ...

    # | Most assignment scripts should exclude this key, but it's available.
    default constants:
        <constant_name>: <value>
        <constant_list>:
        - ...

    # | MOST assignment scripts should have this key!
    interact scripts:
    - <interact_script_name>


Though note that almost always you should include the 'actions:' key, usually with the 'on assignment:' action (if using triggers).
Refer to Action:assignment.
GroupScript Container System
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/containers/core/AssignmentScriptContainer.java#L13
NameCommand Script Containers
DescriptionCommand script containers allow you to register your own custom commands to the server.
This also allows the command to show up in the '/help' command, with some info on the command.

Note that existing names or aliases from other plugins will be overridden.
If you want to run a script at the same time as an existing command, see Event:on command.

The following is the format for the container.

The required keys are 'name:', 'description:', 'usage:', and 'script:'
All other keys can be excluded if unneeded.
If you are not intentionally setting a specific value for the other keys, it is
strongly recommended that you simply not include them at all.

Please note that 'name:' is the true name of the command (written by users),
and 'usage:' is for documentation in the '/help' command.
These two options should almost always show the same name.


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


# The name of the script doesn't matter, and will not affect the command in any way.
Command_Script_Name:

    type: command

    # The name of the command. This will be the default method for running the command, and will show in '/help'.
    # | All command scripts MUST have this key!
    name: mycmd

    # The description of the command. This will be shown in the '/help' command.
    # Multiple lines are acceptable, via <&nl> (the tag for a new line), but you should
    # make the first line a brief summary of what your command does.
    # | All command scripts MUST have this key!
    description: My command.

    # Correct usage for the command. This will show in the '/help' command.
    # This is NOT the name of the command, and it is NOT used to control input parsing. It is EXCLUSIVELY for '/help'.
    # | All command scripts MUST have this key!
    usage: /mycmd <&lt>myArg1<&gt>

    # A list of aliases for the command. These will be used as alternative ways to trigger the command, and will show in the '/help' command.
    # | Some command scripts might have this key, but it's optional.
    aliases:
    - myalias
    - mycommand

    # The permission node to check for permissions plugins. This will automatically
    # block players without the permission from accessing the command and help for
    # the command.
    # Note that you can include multiple permission nodes (a player only needs to have any one permission from the list)
    # by separating them with a semicolon, like: perm.one;perm.two;third.perm
    # | Most command scripts should have this key!
    permission: my.permission.node

    # The message to send to the player when they try to use the command without
    # permission. If this is not specified, the default Bukkit message will be sent.
    # Has "permission" def available.
    # | Most command scripts should NOT have this key, but it's available.
    permission message: Sorry, <player.name>, you can't use my command because you don't have the permission '<[permission]>'!

    # The procedure-based script that will be checked when a player or the console
    # is trying to view help for this command. This must always be determined true
    # or false. If there is no script, it's assumed that all players and the console
    # should be allowed to view the help for this command.
    # Available context: <context.server> returns whether the server is viewing the help (a player if false).
    # | Most command scripts should NOT have this key, but it's available.
    allowed help:
    - determine <player.has_flag[special_allowed_help_flag]||<context.server>>

    # You can optionally specify tab completions on a per-argument basis.
    # Available context:
    # <context.args> returns a list of input arguments.
    # <context.raw_args> returns all the arguments as raw text.
    # <context.server> returns whether the server is using tab completion (a player if false).
    # <context.alias> returns the command alias being used.
    # | This key is great to have when used well, but is not required.
    tab completions:
        # This will complete "alpha" and "beta" for the first argument
        1: alpha|beta
        # This will complete any online player name for the second argument
        2: <server.online_players.parse[name]>
        # This will allow flags "-a", "-b", or "-c" to be entered in the third, fourth, or fifth argument.
        3 4 5: -a|-b|-c
        # Any argument other than the ones explicitly listed will be handled here with a tab complete that just says 'StopTyping'.
        default: StopTyping

    # You can also optionally use the 'tab complete' key to build custom procedure-style tab complete logic
    # if the simply numeric argument basis isn't sufficient.
    # Has the same context available as 'tab completions'.
    # | Most scripts should leave this key off, though it can be useful to some.
    tab complete:
    - determine some|dynamic|logic|here

    # The script that will run when the command is executed.
    # No, you do not need '- determine fulfilled' or anything of the sort, since the command is fully registered.
    # Available context:
    # <context.args> returns a list of input arguments.
    # <context.raw_args> returns all the arguments as raw text.
    # <context.source_type> returns the source of the command. Can be: PLAYER, SERVER, COMMAND_BLOCK, or COMMAND_MINECART.
    # <context.alias> returns the command alias being used.
    # <context.command_block_location> returns the command block's location (if the command was run from one).
    # <context.command_minecart> returns the EntityTag of the command minecart (if the command was run from one).
    # | All command scripts MUST have this key!
    script:
    - narrate Yay!
    - narrate "My command worked!"
    - narrate "And I typed '/<context.alias> <context.raw_args>'!"
GroupScript Container System
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/containers/core/CommandScriptContainer.java#L28
NameData Actions
DescriptionSeveral commands function as a way to modify data values,
including Command:flag, Command:yaml, and Command:define.
These commands each allow for a set of generic data change operations.

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

The following actions are available:

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

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

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

Note that the <key> input may take an index input as well, for example "mykey[3]:value".
This also works with most actions.
That is, for example: "mykey[3]:--" will decrement the third item in the list at 'mykey'.
This syntax may also be used to remove the entry at a specified index, for example "mykey[3]:<-"
The index can also be "last" to automatically use the last entry in the list as the target.
GroupUseful Lists
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/utilities/data/DataActionType.java#L5
NameEconomy Script Containers
DescriptionEconomy script containers

Economy script containers provide a Vault economy, which can be used in scripts by
Tag:PlayerTag.money and Command:money
and as well by any other plugin that relies on economy functionality (such as shop plugins).

Note that vault economy bank systems are not currently supported.
Per-world economies are also not currently supported.

Note that in most cases, you do not want to have multiple economy providers, as only one will actually be in use.

ALL SCRIPT KEYS ARE REQUIRED.

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


# The script name will be shown to the economy provider as the name of the economy system.
Economy_Script_Name:

    type: economy

    # The Bukkit service priority. Priorities are Lowest, Low, Normal, High, Highest.
    priority: normal
    # The name of the currency in the singular (such as "dollar" or "euro").
    name single: scripto
    # The name of the currency in the plural (such as "dollars" or "euros").
    name plural: scriptos
    # How many digits after the decimal to include. For example, '2' means '1.05' is a valid amount, but '1.005' will be rounded.
    digits: 2
    # Format the standard output for the money in human-readable format. Use "<[amount]>" for the actual amount to display.
    # Fully supports tags.
    format: $<[amount]>
    # A tag that returns the balance of a linked player. Use a 'proc[]' tag if you need more complex logic.
    # Must return a decimal number.
    balance: <player.flag[money]>
    # A tag that returns a boolean indicating whether the linked player has the amount specified by def "<[amount]>".
    # Use a 'proc[]' tag if you need more complex logic.
    # Must return 'true' or 'false'.
    has: <player.flag[money].is[or_more].than[<[amount]>]>
    # A script that removes the amount of money needed from a player.
    # Note that it's generally up to the systems calling this script to verify that the amount can be safely withdrawn, not this script itself.
    # However you may wish to verify that the player has the amount required within this script.
    # The script may determine a failure message if the withdraw was refused. Determine nothing for no error.
    # Use def 'amount' for the amount to withdraw.
    withdraw:
    - flag <player> money:-:<[amount]>
    # A script that adds the amount of money needed to a player.
    # The script may determine a failure message if the deposit was refused. Determine nothing for no error.
    # Use def 'amount' for the amount to deposit.
    deposit:
    - flag <player> money:+:<[amount]>

GroupScript Container System
RequiresVault
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/containers/core/EconomyScriptContainer.java#L34
NameEntity Script Containers
DescriptionEntity script containers are an easy way to pre-define custom entities for use within scripts. Entity
scripts work with the EntityTag object, and can be fetched with the Object Fetcher by using the
EntityTag constructor of simply the script name. Example: - spawn <player.location> MyEntity

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

You can also include a 'custom' key to hold any custom data attached to the script.


# The name of the entity script is the same name that you can use to construct a new
# EntityTag based on this entity script. For example, an entity script named 'space_zombie'
# can be referred to as 'space_zombie'.
Entity_Script_Name:

    type: entity

    # Must be a valid EntityTag (EG 'zombie' or 'pig[age=baby]') See 'EntityTag' for more information.
    # | All entity scripts MUST have this key!
    entity_type: BASE_ENTITY_TYPE_HERE

    # If you want custom data that won't be parsed, use the 'data' root key.
    # | Some entity scripts should have this key!
    data:
        example_key: example value

    # You can set flags on the entity when it spawns.
    # | Some entity scripts should have this key!
    flags:
        my_flag: my value

    # Specify any mechanisms to apply the entity when it spawns.
    # | Some entity scripts should have this key!
    mechanisms:

        # Samples of mechanisms to use (any valid EntityTag mechanisms may be listed like this):

        # Whether the entity has the default AI
        # | Do not copy this line, it is only an example.
        has_ai: true/false

        # What age the entity is
        # | Do not copy this line, it is only an example.
        age: baby/adult/<#>


MORE MECHANISM OPTIONS ARE LISTED HERE: 🔗https://meta.denizenscript.com/Docs/Mechanisms/entitytag.
GroupScript Container System
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/containers/core/EntityScriptContainer.java#L27
NameHealth Trait
DescriptionBy default, NPCs are invulnerable, unable to be damaged. If you want your NPC
to be able to take damage, or use the left click as an interaction, it must
have the health trait. The Health trait is automatically enabled if you set
the damage trigger state to true.

You can use the denizen vulnerable command to make your NPCs react to left
click, but not take damage. - vulnerable state:false

Enable Damage trigger via dScript: - trigger name:damage state:true
Enable Health trait via dScript: - trait state:true health
Enable Health trait via npc command: /npc health --set # (-r)

Enable automatic respawn (default delay 300t): /npc health --respawndelay [delay as a duration]
Set respawn location: - flag <npc> respawn_location:<location>

Related Tags
Tag:EntityTag.health
Tag:EntityTag.formatted_health
Tag:EntityTag.health_max
Tag:EntityTag.health_percentage
Tag:NPCTag.has_trait[health]

Related Mechanisms
Mechanism:EntityTag.health
Mechanism:EntityTag.max_health

Related Commands
Command:heal
Command:health
Command:vulnerable

Related Actions
Action:on damage
Action:on damaged
Action:on no damage trigger
GroupNPC Traits
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/npc/traits/HealthTrait.java#L29
NameItem Script Containers
DescriptionItem script containers are an easy way to pre-define custom items for use within scripts. Item
scripts work with the ItemTag object, and can be fetched with the Object Fetcher by using the
ItemTag constructor ItemTag_script_name. Example: - drop <player.location> super_dooper_diamond

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


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

    type: item

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

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

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

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

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

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

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

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

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

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

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

    # If your material is a 'written_book', you can specify a book script to automatically scribe your item
    # upon creation. See 'book script containers' for more information.
    # | Most item scripts should exclude this key, though there are certain rare cases it may be useful to.
    book: book_script_name
GroupScript Container System
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/containers/core/ItemScriptContainer.java#L30
NameMythicMobs Bridge
DescriptionIn addition to the tags, commands, and events found by searching for "mythicmobs" throughout the meta documentation,
Depenizen adds 4 new Denizen matchers, and additional features to Mythic Mobs: 2 Targeters, and a Condition.

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

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

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

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

Usage Examples

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

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

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

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

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

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

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

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

There's a great deal more to learn about ObjectTags, so be sure to check out each object type for more
specific information. While all ObjectTags share some features, many contain goodies on top of that!
GroupObject System
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/utilities/CommonRegistries.java#L29
NamePlaceholderAPI Bridge
DescriptionUsing Depenizen with PlaceholderAPI allows you to use Tag:placeholder and Tag:placeholder.player,
and also allows you to read Denizen tags from any PAPI placeholder location, written in the format: %denizen_<tag-here>%
For example: %denizen_<player.flag[MyFlag]>%
GroupDepenizen Bridges
RequiresDepenizen, PlaceholderAPI
Sourcehttps://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/bridges/PlaceholderAPIBridge.java#L25
NameProcedure Script Containers
DescriptionProcedure script containers are used to define a script that can be ran through a tag.

Generally called via Tag:proc or Tag:proc.context.

The only required key is 'script:'.

Note that procedure scripts must NEVER change external state.
That is, a procedure script cannot change anything at all, ONLY determine a value.
Setting a flag, loading a YAML document, placing a block, etc. are all examples of external changes that are NOT allowed.

This restriction comes from two main reasons:
- Tags run in arbitrary conditions. They may be read asynchronously or in other weird circumstances that can result
in applied changes crashing your server or other unexpected side effects.
- Tags can run for a variety of reasons.
If you were to make a proc script 'spawn_entity' that actually spawns an entity into the world,
you would likely end up with a *lot* of unintentional entity spawns.
Some tags will be read multiple times when theoretically ran once,
in some circumstances a tag read might even be based on user input! (Particularly if you ever make use of the '.parsed' tag,
or the list.parse/filter/sort_by_number tags).
Imagine if for example, a tag can be read when users input a specific custom command,
and a clever user finds out they can type "/testcommand 32 <proc[spawn_entity].context[creeper]>"
to spawn a creeper ... that would be a major problem!
In general, maximum caution is the best for situations like this... simply *never* make a procedure
that executes external changes.


Proc_Script_Name:

    type: procedure

    # Optionally specify definition names to use with the 'context' input of the proc tag.
    definitions: def|names|here

    script:

    # Put any logic, then determine the result.
    - determine 5

GroupScript Container System
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/containers/core/ProcedureScriptContainer.java#L9
NameScript Event Switches
DescriptionModern script events support the concept of 'switches'.
A switch is a specification of additional requirements in an event line other than what's in the event label it.

A switch consists of a name and a value input, and are can be added anywhere in an event line as "name:<value>".
For example, "on delta time secondly every:5:" is a valid event, where "delta time secondly" is the event itself, and "every:<#>" is a switch available to the event.

A traditional Denizen event might look like "on <entity> damaged",
where "<entity>" can be filled with "entity" or any entity type (like "player").
A switch-using event would instead take the format "on entity damaged" with switch "type:<entity type>"
meaning you can do "on entity damaged" for any entity, or "on entity damaged type:player:" for players specifically.
This is both more efficient to process and more explicit in what's going on, however it is less clear/readable to the average user, so it is not often used.
Some events may have switches for less-often specified data, and use the event line for other options.

There are also some standard switches available to every script event, and some available to an entire category of script events.

One switch available to every event is "server_flagged:<flag_name>", which requires that there be a server flag under the given name.
For example, "on console output server_flagged:recording:" will only run the handler for console output when the "recording" flag is set on the server.
This can also be used to require the server does NOT have a flag with "server_flagged:!<flag_name>"

"chance:<percent>" is also a globally available switch.
For example, "on player breaks diamond_ore chance:25:" will only fire on average one in every four times that a player breaks a diamond ore block.

Events that have a player linked have the "flagged" and "permission" switches available.

If the switch is specified, and an event doesn't have a linked player, the event will automatically fail to match.
The "flagged:<flag_name>" switch will limit the event to only fire when the player has the flag with the specified name.
It can be used like "on player breaks block flagged:nobreak:" (that would be used alongside "- flag player nobreak").
You can also use "flagged:!<flag_name>" to require the player does NOT have the flag, like "on player breaks block flagged:!griefbypass:"

The "permission:<perm key>" will limit the event to only fire when the player has the specified permission key.
It can be used like "on player breaks block permission:denizen.my.perm:"
For multiple flag or permission requirements, just list them separated by '|' pipes, like "flagged:a|b|c". This will require all named flags/permissions to be present, not just one.

Events that have an NPC linked have the "assigned" switch available.
If the switch is specified, and an event doesn't have a linked NPC, the event will automatically fail to match.
The "assigned:<script name>" switch will limit the event to only fire when the NPC has an assignment script that matches the given advanced matcher.

Events that occur at a specific location have the "in:<area>" and "location_flagged" switches.
This switches will be ignored (not counted one way or the other) for events that don't have a known location.
For "in:<area>" switches, 'area' is any area-defining tag type - refer to Language:Advanced Object Matchables.
"location_flagged:<flag name>" works just like "server_flagged" or the player "flagged" switches, but for locations.

All script events have priority switches (see Language:script event priority),
All Bukkit events have bukkit priority switches (see Language:bukkit event priority),
All cancellable script events have cancellation switches (see Language:script event cancellation).

See also Language:Advanced Object Matching.
GroupScript Events
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/events/ScriptEvent.java#L236
NameTag Fallbacks
DescriptionTag fallbacks (AKA "tag alternatives") are a system designed to allow scripters to automatically handle tag errors.

Fallbacks are implemented as special "magic tags" that look like any other tag-part, but override the error handler. These are "if_null", "exists", and "is_truthy".

A tag without a fallback might look like "<player.name>".
This tag works fine as long as there's a linked player, but what if a player isn't always available?
Normally, this situation would display an error in the console debug logs, and return plaintext "player.name" in the script.
A fallback can help us handle the problem more gracefully.
That same tag with a fallback would look like "<player.name.if_null[Steve]>".
Now, when there isn't a player available, there will not be an error, and the tag will simply return "Steve".

This format is the same for basically all tags. "<main.tag.here.if_null[Fallback here]>".
For another example, "<player.flag[myflag].if_null[0]>" returns either the value of the flag, or "0" if the flag is not present (or if there's no player).

The "exists" fallback-tag is available for checking whether an object exists and is valid.
What if we want to check if there even is a linked player? We don't have a "<has_player>" tag to do that, so what can we do?

- if <player.exists>:

The above example demonstrates using a fallback to check if a player is valid.
The if block will run only if there is not a player valid (you might, for example, place the "stop" command inside).

"Exists" is useful when you *only* need a check, however you often need to grab a value and verify it after.
Consider the following example, often found in command scripts:

- define target <server.match_player[<context.args.get[1]>].if_null[null]>
- if <[target]> == null:
    - narrate "<&[error]>Invalid player!"
    - stop
- narrate "<&[base]>You chose <&[emphasis]><[target].name><&[base]>!"


We use the word "null" in the above example, as well as in the tag name itself. This is a common programming term that means "no object is present".
"if_null" is the actual tag name, however the input value of "null" isn't actually a functionality of Denizen, it's just a word we choose for clarity.
You could just as easily do "- if <player.if_null[nothing]> == nothing:", or for that matter "- if <player.if_null[cheese]> == cheese:".
A player object takes the form "p@uuid", so it will therefore never exactly match any simple word, so there's no coincidental match edge-case to worry about.
Note that this won't work so perfect for things like a user input or fully dynamic value,
so in those cases you may want to use the "exists" tag explicitly to guarantee no potential conflict.

Fallbacks can be tags themselves. So, for example, if we want either a custom flag-based display name, or if not available, the player's base name,
we can do: "<player.flag[display_name].if_null[<player.name>]>".
You can as well chain these: "<player.flag[good_name].if_null[<player.flag[bad_name].if_null[<player.name>]>]>".

Note that fallbacks will *hide errors*. Generally, the only errors you should ever hide are ones you're expecting that are fine.
Don't use a fallback on a "<player.name>" tag, for example, if there should always be a player present when the script runs.
That tag should only ever have a fallback when the script is meant to still work without a player attached.
If you carelessly apply fallbacks to all tags, you might end up not realizing there's a problem in your script until it's affecting real players.
You want to solve errors in testing, not ten months later when a player mentions to you "that shop NPC let me buy things even when I had $0"!

Prior to Denizen 1.2.0, fallbacks exclusively worked with a special "||" syntax, like "- if <player||null> == null:"
This syntax is still fully supported at time of writing, however the newer tag-based format is considered clearer and easier to learn.
GroupTag System
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/tags/Attribute.java#L471
NameThe Global If Argument
DescriptionThe "if:<boolean>" argument is a special meta-argument that is available for all commands, but is more useful for some than others.
It is written like:

- stop if:<player.has_flag[forbidden]>
# Equivalent to
- if <player.has_flag[forbidden]>:
  - stop


When the if argument is used, the command will only run if the value of the argument is 'true'.

The most useful place to have this is a 'stop' command, to quickly stop a script if a condition is true (a player has a flag, lacks a permission, is outside a region, or whatever else).

If you need more complex matching, especially using '&&', '||', '==', etc. you should probably just do an 'if' command rather than using the argument.
Though if you really want to, you can use tags here like Tag:objecttag.is.to or Tag:elementtag.and or Tag:elementtag.or.
GroupScript Command System
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/CommandExecutor.java#L50
NameThe Player and NPC Arguments
DescriptionThe "player:<player>" and "npc:<npc>" arguments are special meta-arguments that are available for all commands, but are only useful for some.
They are written like:
- give stick player:<server.flag[some_player]>
or:
- sit npc:<entry[save].created_npc>

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

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

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

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

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

- foreach <server.players> as:__player:
    - narrate "Hi <player.name> isn't it nice how the player is linked here"
GroupScript Command System
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/utilities/implementation/DenizenCoreImplementation.java#L107

Mechanism


Namecustom_data
ObjectItemTag
InputMapTag
Related Tags<ItemTag.custom_data> (Property) Returns an item's custom NBT data, if any. (...)
Description(Property) Sets an item's custom NBT data, if any.
The map is in NBT format, see Language:Raw NBT Encoding.
This does not include any normal vanilla data (enchantments, lore, etc.), just extra custom data.
This is useful for integrating with items from external systems (such as custom items from plugins), but item flags should be preferred otherwise.
Provide no input to clear custom data.
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemCustomData.java#L13
Nameunbreakable
ObjectItemTag
InputElementTag(Boolean)
Related Tags<ItemTag.unbreakable> Returns whether an item has the unbreakable flag.
DescriptionChanges whether an item has the unbreakable item flag.
Generated Example
- adjust <player.item_in_hand> unbreakable:false
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemUnbreakable.java#L70
Namehide_entities
ObjectPlayerTag
InputElementTag
DescriptionHides a matchable type of entity from the player. Can use any advanced entity matchers per Language:Advanced Object Matching.
To hide a specific entity from the player, use Mechanism:PlayerTag.hide_entity.
To remove hide sets, use Mechanism:PlayerTag.unhide_entities.
Note that dynamic matchables like 'entity_flagged' will behave in unexpected ways when dynamically changing.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L3368

ObjectType


NameBiomeTag
Prefixb@
Base TypeElementTag
ImplementsFlaggableObject
Identity FormatThe identity format for biomes is a world name, then a comma, then the biome key. For example: 'hub,desert', or 'space,minecraft:desert'.
DescriptionA BiomeTag represents a world biome type. Vanilla biomes are globally available, however some biomes are world-specific when added by datapacks.

A list of all vanilla biomes can be found at 🔗https://minecraft.wiki/w/Biome#Biome_IDs.

BiomeTags without a specific world will work as though they are in the server's default world.

This object type is flaggable.
Flags on this object type will be stored in the server saves file, under special sub-key "__biomes"
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/BiomeTag.java#L33
NameChunkTag
Prefixch@
Base TypeElementTag
ImplementsFlaggableObject
Identity FormatThe identity format for chunks is <x>,<z>,<world>
For example, 'ch@5,3,world'.
DescriptionA ChunkTag represents a chunk in the world.

Note that the X/Z pair are chunk coordinates, not block coordinates.
To convert from block coordinates to chunk coordinates, divide by 16 and round downward.
Note that negative chunks are one unit lower than you might expect.
To understand why, simply look at chunks on a number line...
x x x x x
-2 -1 b 0 a 1 2
The block 'a' at block position '1' is in chunk '0', but the block 'b' at block position '-1' is in chunk '-1'.
As otherwise (if 'b' was in chunk '0'), chunk '0' would be double-wide (32 blocks wide instead of the standard 16).

For example, block at X,Z 32,67 is in the chunk at X,Z 2,4
And the block at X,Z -32,-67 is in the chunk at X,Z -2,-5

This object type is flaggable.
Flags on this object type will be stored in the chunk file inside the world folder.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/ChunkTag.java#L33
NameCuboidTag
Prefixcu@
Base TypeElementTag
ImplementsFlaggableObject, AreaObject
Identity FormatThe identity format for cuboids is <world>,<x1>,<y1>,<z1>,<x2>,<y2>,<z2>
Multi-member cuboids can simply continue listing x,y,z pairs.
For example, 'cu@space,1,2,3,4,5,6'.
DescriptionA CuboidTag represents a cuboidal region in the world.

The word 'cuboid' means a less strict cube.
Basically: a "cuboid" is to a 3D "cube" what a "rectangle" is to a 2D "square".

One 'cuboid' consists of two points: the low point and a high point.
a CuboidTag can contain as many cuboids within itself as needed (this allows forming more complex shapes from a single CuboidTag).

Note that the coordinates used are inclusive, meaning that a CuboidTag always includes the blocks identified as the low and high corner points.
This means for example that a cuboid from "5,5,5" to "5,5,5" will contain one full block, and have a size of "1,1,1".

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.
MatchableRefer to ObjectType:areaobject's matchable list.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/CuboidTag.java#L35
NameDiscordBotTag
Prefixdiscord@
Base TypeElementTag
ImplementsFlaggableObject
Identity FormatThe identity format for Discord bots is the bot ID (as chosen in Command:discord).
For example: mybot
DescriptionA DiscordBotTag is an object that represents a Discord bot powered by dDiscordBot.

This object type is flaggable.
Flags on this object type will be stored in: plugins/dDiscordBot/flags/bot_(botname).dat
RequiresdDiscordBot
Sourcehttps://github.com/DenizenScript/dDiscordBot/blob/master/src/main/java/com/denizenscript/ddiscordbot/objects/DiscordBotTag.java#L19
NameDiscordChannelTag
Prefixdiscordchannel@
Base TypeElementTag
ImplementsFlaggableObject
Identity FormatThe identity format for Discord channels is the bot ID (optional), followed by the channel ID (required).
For example: 1234
Or: mybot,1234
DescriptionA DiscordChannelTag is an object that represents a channel (text or voice) on Discord, either as a generic reference,
or as a bot-specific reference (the relevant guild is inherently linked, and does not need to be specified).

This object type is flaggable.
Flags on this object type will be stored in: plugins/dDiscordBot/flags/bot_(botname).dat, under special sub-key "__channels"
RequiresdDiscordBot
Sourcehttps://github.com/DenizenScript/dDiscordBot/blob/master/src/main/java/com/denizenscript/ddiscordbot/objects/DiscordChannelTag.java#L28
NameDiscordCommandTag
Prefixdiscordcommand@
Base TypeElementTag
ImplementsFlaggableObject
Identity FormatThe identity format for Discord commands is the bot ID (optional), followed by the guild ID (optional), followed by the command ID (required).
For example: 1234
Or: 12,1234
Or: mybot,12,1234
DescriptionA DiscordCommandTag is an object that represents a created slash command on Discord, as a bot-specific reference.

This object type is flaggable.
Flags on this object type will be stored in: plugins/dDiscordBot/flags/bot_(botname).dat, under special sub-key "__commands"
RequiresdDiscordBot
Sourcehttps://github.com/DenizenScript/dDiscordBot/blob/master/src/main/java/com/denizenscript/ddiscordbot/objects/DiscordCommandTag.java#L25
NameDiscordGroupTag
Prefixdiscordgroup@
Base TypeElementTag
ImplementsFlaggableObject
Identity FormatThe identity format for Discord groups is the bot ID (optional), followed by the guild ID (required).
For example: 1234
Or: mybot,1234
DescriptionA DiscordGroupTag is an object that represents a group on Discord, either as a generic reference,
or as a bot-specific reference.

Note that the correct name for what we call here a 'group' is inconsistent between different people.
The Discord API calls it a "guild" (for historical reasons, not called that by *people* anymore usually),
messages in the Discord app call it a "server" (which is a convenient name but is factually inaccurate, as they are not servers),
many people will simply say "a Discord" (which is awkward for branding and also would be confusing if used in documentation).
So we're going with "group" (which is still confusing because "group" sometimes refers to DM groups, but... it's good enough).

This object type is flaggable.
Flags on this object type will be stored in: plugins/dDiscordBot/flags/bot_(botname).dat, under special sub-key "__guilds"
RequiresdDiscordBot
Sourcehttps://github.com/DenizenScript/dDiscordBot/blob/master/src/main/java/com/denizenscript/ddiscordbot/objects/DiscordGroupTag.java#L27
NameDiscordInteractionTag
Prefixdiscordinteraction@
Base TypeElementTag
ImplementsFlaggableObject
Identity FormatThe identity format for Discord interactions is the bot ID, followed by the interaction ID.
For example: mybot,5678
DescriptionA DiscordInteractionTag is an object that represents an interaction on Discord, either as a generic reference, or as a bot-specific reference.
Interactions are temporary - they only exist for 15 minutes.

This object type is flaggable.
Flags on this object type will be stored in temporary memory.
RequiresdDiscordBot
Sourcehttps://github.com/DenizenScript/dDiscordBot/blob/master/src/main/java/com/denizenscript/ddiscordbot/objects/DiscordInteractionTag.java#L28
NameDiscordMessageTag
Prefixdiscordmessage@
Base TypeElementTag
ImplementsFlaggableObject
Identity FormatThe identity format for Discord messages is the bot ID (optional), followed by the channel ID (optional), followed by the message ID (required).
For example: 1234
Or: 12,1234
Or: mybot,12,1234
DescriptionA DiscordMessageTag is an object that represents a message already sent on Discord, either as a generic reference,
or as a bot-specific reference.
Note that this is not used for messages that *are going to be* sent.
Note that this often does not contain data for messages that have been deleted (unless that data is cached).

This object type is flaggable.
Flags on this object type will be stored in: plugins/dDiscordBot/flags/bot_(botname).dat, under special sub-key "__messages"
RequiresdDiscordBot
Sourcehttps://github.com/DenizenScript/dDiscordBot/blob/master/src/main/java/com/denizenscript/ddiscordbot/objects/DiscordMessageTag.java#L26
NameDiscordReactionTag
Prefixdiscordreaction@
Base TypeElementTag
ImplementsFlaggableObject
Identity FormatThe identity format for Discord reactions is the bot ID, followed by the channel ID, followed by the message ID, followed by the reaction ID.
Or: mybot,12,1234,99
The reaction ID for custom reactions is an ID number, and for default emojis is the unicode text format of the emoji.
DescriptionA DiscordReactionTag is an object that represents a reaction to a message already sent on Discord, as a generic reference.

This object type is flaggable.
Flags on this object type will be stored in: plugins/dDiscordBot/flags/bot_(botname).dat, under special sub-key "__reactions"
RequiresdDiscordBot
Sourcehttps://github.com/DenizenScript/dDiscordBot/blob/master/src/main/java/com/denizenscript/ddiscordbot/objects/DiscordReactionTag.java#L27
NameDiscordRoleTag
Prefixdiscordrole@
Base TypeElementTag
ImplementsFlaggableObject
Identity FormatThe identity format for Discord roles is the bot ID (optional), followed by the guild ID (optional), followed by the role ID (required).
For example: 4321
Or: 1234,4321
Or: mybot,1234,4321
DescriptionA DiscordRoleTag is an object that represents a role on Discord, either as a generic reference,
or as a guild-specific reference, or as a bot+guild-specific reference.

This object type is flaggable.
Flags on this object type will be stored in: plugins/dDiscordBot/flags/bot_(botname).dat, under special sub-key "__roles"
RequiresdDiscordBot
Sourcehttps://github.com/DenizenScript/dDiscordBot/blob/master/src/main/java/com/denizenscript/ddiscordbot/objects/DiscordRoleTag.java#L26
NameDiscordUserTag
Prefixdiscorduser@
Base TypeElementTag
ImplementsFlaggableObject
Identity FormatThe identity format for Discord users is the bot ID (optional), followed by the user ID (required).
For example: 1234
Or: mybot,1234
DescriptionA DiscordUserTag is an object that represents a user (human or bot) on Discord, either as a generic reference,
or as a bot-specific reference.

This object type is flaggable.
Flags on this object type will be stored in: plugins/dDiscordBot/flags/bot_(botname).dat, under special sub-key "__users"
RequiresdDiscordBot
Sourcehttps://github.com/DenizenScript/dDiscordBot/blob/master/src/main/java/com/denizenscript/ddiscordbot/objects/DiscordUserTag.java#L28
NameEllipsoidTag
Prefixellipsoid@
Base TypeElementTag
ImplementsFlaggableObject, AreaObject
Identity FormatThe identity format for ellipsoids is <x>,<y>,<z>,<world>,<x-radius>,<y-radius>,<z-radius>
For example, 'ellipsoid@1,2,3,space,7,7,7'.
DescriptionAn EllipsoidTag represents an ellipsoidal region in the world.

The word 'ellipsoid' means a less strict sphere.
Basically: an "ellipsoid" is to a 3D "sphere" what an "ellipse" (or "oval") is to a 2D "circle".

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.
MatchableRefer to ObjectType:areaobject's matchable list.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EllipsoidTag.java#L29
NameEnchantmentTag
Prefixenchantment@
Base TypeElementTag
ImplementsFlaggableObject
Identity FormatThe identity format for enchantments is the vanilla ID, Denizen ID, or full key. Can also be constructed by Denizen script name.
For example, 'enchantment@sharpness', 'enchantment@my_custom_ench', or 'enchantment@otherplugin:customench'.
DescriptionAn EnchantmentTag represents an item enchantment abstractly (the enchantment itself, like 'sharpness', which *can be* applied to an item, as opposed to the specific reference to an enchantment on a specific item).
For enchantment names, check 🔗https://minecraft.wiki/w/Enchanting#Summary_of_enchantments. Note spaces should swapped to underscores, so for example "Aqua Affinity" becomes "aqua_affinity".

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

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

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

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

This object type is flaggable.
Flags on this object type will be stored in the server saves file, under special sub-key "__depenizen_gp_claims_id"
RequiresDepenizen, GriefPrevention
Sourcehttps://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/objects/griefprevention/GriefPreventionClaimTag.java#L27
NameInventoryTag
Prefixin@
Base TypeElementTag
ImplementsFlaggableObject, PropertyHolderObject
Identity FormatThe identity format for inventories is the classification type of inventory to use. All other data is specified through properties.
DescriptionAn 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.
MatchableInventoryTag 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 Language:inventory script containers).
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L59
NameItemTag
Prefixi@
Base TypeElementTag
ImplementsFlaggableObject, PropertyHolderObject
Identity FormatThe identity format for items is the basic material type name, or an item script name. Other data is specified in properties.
For example, 'i@stick'.
DescriptionAn ItemTag represents a holdable item generically.

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

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

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

This object type is flaggable.
Flags on this object type will be stored in the item NBT.
MatchableItemTag matchers, sometimes identified as "<item>", often seen as "with:<item>":
"potion": plaintext: matches if the item is any form of potion item.
"script": plaintext: matches if the item is any form of script item.
"item_flagged:<flag>": A Flag Matcher for item flags.
"item_enchanted:<enchantment>": matches if the item is enchanted with the given enchantment name (excluding enchantment books). Allows advanced matchers.
"raw_exact:<item>": matches based on exact raw item data comparison (almost always a bad idea to use).
Item property format: will validate that the item material matches and all directly specified properties also match. Any properties not specified won't be checked.
for example "stick[display=Hi]" will match any 'stick' with a displayname of 'hi', regardless of whether that stick has lore or not, or has enchantments or not, or etc.
Item script names: matches if the item is a script item with the given item script name, using advanced matchers.
If none of the above are used, uses MaterialTag matchables. Refer to MaterialTag matchable list above.
Note that "item" plaintext is always true.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/ItemTag.java#L56
NameJavaReflectedObjectTag
Prefixreflected@
Base TypeElementTag
Identity FormatThe identity format for JavaReflectedObjectTag is a random UUID that is associated with a temporary lookup to reduce reparsing risk.
DescriptionJavaReflectedObjectTag represent raw Java objects for reflection-based interactions in Denizen.
This is only useful in certain interop edge cases, and should usually be avoided.
They have no persistent identity, and instead only use a temporary generated UUID for the identity to allow reconstruction by lookup.
Two different JavaReflectedObjectTag might simultaneously refer to the same underlying Java object, despite having different IDs.
A Java object should not be retained in flags or other long term storage, as they will necessarily become invalid quickly.
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/JavaReflectedObjectTag.java#L20
NameLocationTag
Prefixl@
Base TypeElementTag
ImplementsFlaggableObject, VectorObject
Identity FormatThe identity format for locations is <x>,<y>,<z>,<pitch>,<yaw>,<world>
Note that you can leave off the world, and/or pitch and yaw, and/or the z value.
You cannot leave off both the z and the pitch+yaw at the same time.
For example, 'l@1,2.15,3,45,90,space' or '[email protected],99,3.2'
DescriptionA LocationTag represents a point in the world.

Note that 'l' prefix is a lowercase 'L', the first letter in 'location'.

This object type is flaggable.
Flags on this object type will be stored in the chunk file inside the world folder.
MatchableLocationTag matchers, sometimes identified as "<location>" or "<block>":
"location" plaintext: always matches.
"block_flagged:<flag>": a Flag Matchable for location flags at the given block location.
"location_in:<area>": runs AreaObject checks, as defined below.
If none of the above are used, and the location is at a real block, a MaterialTag matchable is used. Refer to ObjectType:MaterialTag matchable list.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L65
NameMaterialTag
Prefixm@
Base TypeElementTag
ImplementsFlaggableObject, PropertyHolderObject
Identity FormatThe identity format for materials is the material type name.
For example, 'm@stick'.
DescriptionA MaterialTag represents a material (a type of block or item).

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

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

This object type is flaggable.
Flags on this object type will be stored in the server saves file, under special sub-key "__materials"
MatchableMaterialTag matchers, sometimes identified as "<material>", associated with "<block>":
"material" plaintext: always matches.
"block" plaintext: matches if the material is a block-type material.
"item" plaintext: matches if the material is an item-type material.
"material_flagged:<flag>": a Flag Matchable for MaterialTag flags.
"vanilla_tagged:<tag_name>": matches if the given vanilla tag applies to the material. Allows advanced matchers, for example: "vanilla_tagged:mineable*".
If none of the above are used, uses an advanced matcher for the material name, like "stick".
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/MaterialTag.java#L37
NameNationTag
Prefixnation@
Base TypeElementTag
ImplementsFlaggableObject
Identity FormatThe identity format for nations is <nation_uuid>
For example, 'nation@123-abc'.
DescriptionA NationTag represents a Towny nation.

This object type is flaggable.
Flags on this object type will be stored in the server saves file, under special sub-key "__depenizen_towny_nations_uuid"
RequiresDepenizen, Towny
Sourcehttps://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/objects/towny/NationTag.java#L27
NameNPCTag
Prefixn@
Base TypeEntityTag
ImplementsFlaggableObject
Identity FormatThe identity format for NPCs is the NPC's id number.
For example, 'n@5'.
Or, an NPC's id number, followed by a comma, followed by a custom registry name.
For example 'n@12,specialnpcs'
DescriptionAn NPCTag represents an NPC configured through Citizens.

This object type is flaggable.
Flags on this object type will be stored in the Citizens saves.yml file, under the 'denizen_flags' trait.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/NPCTag.java#L51
NamePlayerTag
Prefixp@
Base TypeEntityTag
ImplementsFlaggableObject
Identity FormatThe identity format for players is the UUID of the relevant player.
DescriptionA PlayerTag represents a player in the game.

This object type is flaggable.
Flags on this object type will be stored in the file "plugins/Denizen/player_flags/(UUID).dat",
with automatic loading only when the player is online and caching for interacting with offline player flags.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L63
NamePluginTag
Prefixpl@
Base TypeElementTag
ImplementsFlaggableObject
Identity FormatThe identity format for plugins is the plugin's registered name.
For example, 'pl@Denizen'.
DescriptionA PluginTag represents a Bukkit plugin on the server.

This object type is flaggable.
Flags on this object type will be stored in the server saves file, under special sub-key "__plugins"
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PluginTag.java#L24
NamePolygonTag
Prefixpolygon@
Base TypeElementTag
ImplementsFlaggableObject, AreaObject
Identity FormatThe identity format for polygons is <world>,<y-min>,<y-max>,<x1>,<z1>,... (the x,z pair repeats for as many points as the polygon has).
DescriptionA PolygonTag represents a polygonal region in the world.

The word 'polygon' means an arbitrary 2D shape.
PolygonTags, in addition to a 2D polygon, contain a minimum and maximum Y coordinate, to allow them to function in 3D.

PolygonTags are NOT polyhedra.

A PolygonTag with 4 points at right angles would cover an area also possible to be defined by a CuboidTag, however all other shapes a PolygonTag can form are unique.

Compared to CuboidTags, PolygonTags are generally slower to process and more complex to work with, but offer the benefit of supporting more intricate shapes.

Note that forming invalid polygons (duplicate corners, impossible shapes, etc) will not necessarily give any error message, and may cause weird results.

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.
MatchableRefer to ObjectType:areaobject's matchable list.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PolygonTag.java#L29
NameQueueTag
Prefixq@
Base TypeElementTag
ImplementsFlaggableObject
Identity FormatThe identity format for queues is simply the queue ID.
DescriptionA QueueTag is a single currently running set of script commands.
This is not to be confused with a script path, which is a single set of script commands that can be run.
There can be one, multiple, or zero queues running at any time for any given path.

This object type is flaggable.
Flags on this object type will be reinterpreted as definitions.
Flags on queues should just not be used. Use definitions directly.
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/QueueTag.java#L21
NameScriptTag
Prefixs@
Base TypeElementTag
ImplementsFlaggableObject
Identity FormatThe identity format for scripts is simply the script name.
DescriptionAn ObjectTag that represents a script container. ScriptTags contain all information inside the script,
and can be used in a variety of commands that require script arguments.
For example, run and inject will 'execute' script entries inside of a script container when given a matching ScriptTag object.

ScriptTags also provide a way to access attributes accessed by the replaceable tag system by using the object fetcher or any other entry point to a ScriptTag object.

This object type is flaggable.
Flags on this object type will be stored in the server saves file, under special sub-key "__scripts"
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ScriptTag.java#L84
NameTimeTag
Prefixtime@
Base TypeElementTag
ImplementsFlaggableObject
Identity FormatThe identity format for TimeTags is "yyyy/mm/dd_hh:mm:ss:mill_offset"
So, for example, 'time@2020/05/23_02:20:31:123_-07:00'
DescriptionA TimeTag represents a real world date/time value.

TimeTags can also be constructed from 'yyyy/mm/dd', 'yyyy/mm/dd_hh:mm:ss', or 'yyyy/mm/dd_hh:mm:ss:mill'.
(Meaning: the offset is optional, the milliseconds are optional, and the time-of-day is optional,
but if you exclude an optional part, you must immediately end the input there, without specifying more).

This object type is flaggable.
Flags on this object type will be stored in the server saves file, under special sub-key "__time"
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/TimeTag.java#L25
NameTownTag
Prefixtown@
Base TypeElementTag
ImplementsFlaggableObject
Identity FormatThe identity format for towns is <town_uuid>
For example, 'town@123-abc'.
DescriptionA TownTag represents a Towny town in the world.

This object type is flaggable.
Flags on this object type will be stored in the server saves file, under special sub-key "__depenizen_towny_towns_uuid"
RequiresDepenizen, Towny
Sourcehttps://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/objects/towny/TownTag.java#L29
NameWorldTag
Prefixw@
Base TypeElementTag
ImplementsFlaggableObject
Identity FormatThe identity format for worlds is the name of the world it should be associated with.
For example, to reference the world named 'world1', use simply 'world1'.
World names are case insensitive.
DescriptionA WorldTag represents a world on the server.

This object type is flaggable.
Flags on this object type will be stored in the world folder in a file named 'denizen_flags.dat', like "server/world/denizen_flags.dat".
MatchableWorldTag matchers, sometimes identified as "<world>":
"world" plaintext: always matches.
World name: matches if the world has the given world name, using advanced matchers.
"world_flagged:<flag>": a Flag Matchable for WorldTag flags.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/WorldTag.java#L43

Tag


Name<ItemTag.custom_data>
ReturnsMapTag
MechanismItemTag.custom_data
Description(Property) Returns an item's custom NBT data, if any.
The map is in NBT format, see Language:Raw NBT Encoding.
This does not include any normal vanilla data (enchantments, lore, etc.), just extra custom data.
This is useful for integrating with items from external systems (such as custom items from plugins), but item flags should be preferred otherwise.
Example
# Use to check if an item has custom data from another plugin.
- if <[item].custom_data.get[external_plugin_data].if_null[null]> == external_custom_item:
  - narrate "You are using an item from an external plugin!"
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemCustomData.java#L13
Name<ItemTag.unbreakable>
ReturnsElementTag(Boolean)
MechanismItemTag.unbreakable
DescriptionReturns whether an item has the unbreakable flag.
Generated Example
- if <player.item_in_hand.unbreakable>:
    - narrate "it was true!"
- else:
    - narrate "it was false!"
Groupproperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemUnbreakable.java#L44

Just Barely Matched Results



Command


NameBossBar
Syntaxbossbar ({auto}/create/update/remove) [<id>] (players:<player>|...) (title:<title>) (progress:<#.#>) (color:<color>) (style:<style>) (options:<option>|...) (uuid:<uuid>)
Short DescriptionShows players a boss bar.
Full DescriptionDisplays a boss bar at the top of the screen of the specified player(s).
You can also update the values and remove the bar.

You can CREATE a new bossbar, UPDATE an existing one, or REMOVE an existing one.
The default 'auto' will either 'create' or 'update' depending on whether it already exists.

Requires an ID.

Progress must be between 0 and 1.

Valid colors: BLUE, GREEN, PINK, PURPLE, RED, WHITE, YELLOW.
Valid styles: SEGMENTED_10, SEGMENTED_12, SEGMENTED_20, SEGMENTED_6, SOLID.
Valid options: CREATE_FOG, DARKEN_SKY, PLAY_BOSS_MUSIC.

The UUID can optionally be specified, and will be sent to the client. Be careful to not overlap multiple bars with the same UUID.
If not specified, it will be random.
Related Tags<server.current_bossbars> Returns a list of all currently active boss bar IDs from Command:bossbar.
<server.bossbar_viewers[<bossbar_id>]> Returns a list of players that should be able to see the given bossbar ID from Command:bossbar.
<PlayerTag.bossbar_ids> Returns a list of all bossbars from Command:bossbar that this player can see. (...)
<entry[saveName].bar_uuid> returns the bossbar's UUID.
Usage Example
# Shows a message to all online players.
- bossbar MyMessageID players:<server.online_players> "title:HI GUYS" color:red
Usage Example
# Update the boss bar's color and progress.
- bossbar update MyMessageID color:blue progress:0.2
Usage Example
# Add more players to the boss bar.
- bossbar update MyMessageID players:<server.flag[new_players]>
Usage Example
# Remove a player from the boss bar.
- bossbar remove MyMessageID players:<[player]>
Usage Example
# Delete the boss bar.
- bossbar remove MyMessageID
Groupserver
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/server/BossBarCommand.java#L34
NameChat
Syntaxchat [<text>] (no_target/targets:<entity>|...) (talkers:<entity>|...) (range:<#.#>)
Short DescriptionCauses an NPC/NPCs to send a chat message to nearby players.
Full DescriptionChat uses an NPC's speech controller provided by Denizen, typically inside 'interact' or 'task' script-containers.
Typically there is already player and NPC context inside a queue that is using the 'chat' command.
In this case, only a text input is required.
Alternatively, target entities can be specified to have any Entity chat to a different target/targets,
or specify 'no_target' to not send the message to any specific target.

Chat from an NPC is formatted by the settings present in Denizen's config.yml.
Players being chatted to see a slightly different message than surrounding players.
By default, a 'chat' will allow other players nearby to also see the conversation. For example:

- chat 'Hello!'

The player being chatted to, by default the attached Player to the script queue, will see a message 'Jack says to you, Hello!',
however surrounding entities will see something along the lines of 'Jack says to Bob, Hello!'.
The format for this is configurable via the "Denizen/config.yml" file.

If sending messages to the Player without any surrounding entities hearing the message is desirable,
it is often times recommended to instead use the 'narrate' command.
Alternatively, on a server-wide scale, the configuration node for the 'range' can be set to 0, however this is discouraged.
Related TagsNone
Usage Example
# Use to emulate an NPC talking out loud to a Player within an interact script-container.
- chat "Hello, <player.name>! Nice day, eh?"
Usage Example
# Use to have an NPC talk to a group of individuals.
- chat targets:<npc.location.find_players_within[6].filter[has_flag[clan_initiate]]> "Welcome, initiate!"
Synonyms (Search Aid)say, speak
Groupplayer
RequiresCitizens
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/player/ChatCommand.java#L43
NameClientRun
Syntaxclientrun [<script>] (path:<name>) (def.<name>:<value>) (defmap:<map>)
Short DescriptionRuns a client script on a Clientizen client.
Full DescriptionRuns a client script on the linked player's client, if they are using Clientizen.

You must specify a client script name to run.

Optionally, use the "path:" argument to choose a specific sub-path within a script.

Optionally, use "def.<name>:<value>" to pass one or more definitions to the client.
Alternately, use "defmap:<map>" to specify definitions to pass as a MapTag, where the keys will be definition names and the values will of course be definition values.
Related TagsNone
Usage Example
# Use to run a task script named 'MyTask' on the linked player's client.
- clientrun MyTask
Usage Example
# Use to run the sub-script under 'sub_path' in a task script named 'MyTask' on the linked player's client.
- clientrun MyTask path:sub_path
Usage Example
# Use to run 'MyTask' on the linked player's client and pass 2 definitions to it.
- clientrun MyTask def.amount:42 def.location:<server.flag[spawn_location]>
Usage Example
# Use to run 'MyTask' on a specific Clientizen player's client.
- clientrun MyTask player:<[clientizenPlayer]>
GroupDepenizen
RequiresDepenizen, Clientizen
Sourcehttps://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/clientizen/commands/ClientRunCommand.java#L24
NameEngage
Syntaxengage (<duration>) (player)
Short DescriptionTemporarily disables an NPCs toggled interact script-container triggers.
Full DescriptionEngaging an NPC will temporarily disable any interact script-container triggers.
To reverse this behavior, use either the disengage command, or specify a duration in which the engage should timeout.
Specifying an engage without a duration will render the NPC engaged until a disengage is used on the NPC.

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

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

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

See Command:Disengage
Related Tags<NPCTag.engaged> Returns whether the NPC is currently engaged. (...)
Usage Example
# Use to make an NPC appear 'busy'.
- engage
- chat 'Give me a few minutes while I mix you a potion!'
- walk <npc.anchor[mixing_station]>
- wait 10s
- walk <npc.anchor[service_station]>
- chat 'Here you go!'
- give potion <player>
- disengage
Usage Example
# Use to avoid 'retrigger'.
- engage 5s
- take quest_item
- flag player finished_quests:->:super_quest
Groupnpc
RequiresCitizens
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/npc/EngageCommand.java#L30
NameIf
Related Guide Pagehttps://guide.denizenscript.com/guides/basics/if-command.html
Syntaxif [<value>] (!)(<operator> <value>) (&&/|| ...) [<commands>]
Short DescriptionCompares values, and runs a subset of commands if they match.
Full DescriptionCompares values, and runs a subset of commands if they match.
Works with the else command, which handles alternatives for when the comparison fails.
The if command is equivalent to the English phrasing "if something is true, then do the following".

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

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

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

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

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

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

When not using a specific comparison operator, true vs false will be determined by Truthiness, see Tag:ObjectTag.is_truthy for details.
For example, "- if <player||null>:" will pass if a player is linked, valid, and online.
Related Tags<ObjectTag.is[<operator>].to[<element>]> Takes an operator, and compares the first object to the given second object. (...)
<ObjectTag.is[<operator>].than[<element>]> Takes an operator, and compares the first object to the given second object. (...)
Usage Example
# Use to narrate a message only if a player has a flag.
- if <player.has_flag[secrets]>:
    - narrate "The secret number is 3!"
Usage Example
# Use to narrate a different message depending on a player's money level.
- if <player.money> > 1000:
    - narrate "You're rich!"
- else:
    - narrate "You're poor!"
Usage Example
# Use to stop a script if a player doesn't have all the prerequisites.
- if !<player.has_flag[quest_complete]> || !<player.has_permission[new_quests]> || <player.money> < 50:
    - narrate "You're not ready!"
    - stop
- narrate "Okay so your quest is to find the needle item in the haystack build next to town."
Usage Example
# Use to perform a complicated requirements test before before changing some event.
- if ( poison|magic|melting contains <context.cause> and <context.damage> > 5 ) or <player.has_flag[weak]>:
    - determine <context.damage.mul[2]>
Groupqueue
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/queue/IfCommand.java#L28
NameQueue
Syntaxqueue (<queue>) [clear/stop/pause/resume/delay:<duration>]
Short DescriptionModifies the current state of a script queue.
Full DescriptionAllows queues to be modified during their run. This can also be used to modify other queues currently running.

Clearing a queue will remove any commands still queued within it, and thus end the queue.
When trying to clear the current queue, use Command:stop instead.

Using the "stop" argument will force the queue to immediately stop running.
When trying to stop the current queue, use Command:stop instead.

Using the "delay:<duration>" argument will cause the queue to wait for a specified duration.
When trying to delay the current queue, use Command:wait instead.

Using the "pause" argument will freeze the queue but keep it listed, waiting for a "resume" instruction.
It is of course not possible to resume the current queue (as if you're running a 'queue' command, the queue can't be paused).

Generally, the queue is considered a non-ideal way of doing things - that is, there's usually a better/cleaner way to achieve similar results.
It's most useful within the "/ex" command for quick problem solving
(eg if a script in testing gets caught in an infinite loop, you can do "/ex queue ID_HERE stop" to fix that).
Related Tags<queue> Returns a queue object constructed from the input value. (...)
<QueueTag.id> Returns the full textual id of the queue.
<QueueTag.size> Returns the number of script entries in the queue.
<util.queues> Returns a list of all currently running queues on the server.
<ScriptTag.queues> Returns all queues which are running for this script.
Usage Example
# Use to force-stop a given queue.
- queue <server.flag[OtherQueue]> clear
Usage Example
# Use to delay the current queue (use <@link command wait> instead!)
- queue delay:5t
Usage Example
# Use to pause the given queue.
- queue <server.flag[OtherQueue]> pause
Usage Example
# Use to resume the given queue.
- queue <server.flag[OtherQueue]> resume
Groupqueue
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/queue/QueueCommand.java#L22
NameWalk
Syntaxwalk (<entity>|...) [<location>/stop] (speed:<#.#>) (auto_range) (radius:<#.#>) (lookat:<location>)
Short DescriptionCauses an entity or list of entities to walk to another location.
Full DescriptionCauses an entity or list of entities to walk to another location.

Specify a destination location to walk to, or 'stop' to stop all walking.

Optionally, specify a "speed:<#.#>" argument to control the speed of the NPCs.

Optionally, specify "auto_range" to automatically set the path range for the walk instruction
(if not specified, an NPC will not be able to walk to a location outside of its existing path range, by default 25 blocks).
(Does not apply to non-NPC entities).

Note that in most cases, the walk command should not be used for paths longer than 100 blocks.
For ideal performance, keep it below 25.

Optionally, specify a list of entities to give them all the same walk instruction at the same time.
If the list is of NPCs, optionally specify a "radius:<#.#>" argument to change the flocking radius.
('Radius' does not apply to non-NPC entities).

Optionally, specify "lookat:<location>" to cause the NPCs to stare at a specific location while walking (as opposed to straight ahead).
('Radius' does not apply to non-NPC entities).

The walk command is ~waitable. Refer to Language:~waitable.
Related Tags<NPCTag.is_navigating> Returns whether the NPC is currently navigating.
<NPCTag.speed> Returns the current speed of the NPC.
<NPCTag.range> Returns the NPC's current maximum pathfinding range.
<NPCTag.target_location> Returns the location the NPC is currently navigating towards (if any).
Usage Example
# Use to make the NPC walk to an anchored position.
- walk <npc> <npc.anchor[spot1]>
Usage Example
# Use to make the NPC walk to an anchored position that may be far away.
- walk <npc> <npc.anchor[spot2]> auto_range
Usage Example
# Use to make the NPC walk to an anchored position while looking backwards.
- walk <npc> <npc.anchor[spot3]> lookat:<npc.anchor[spot2]>
Usage Example
# Use to make the NPC walk to an anchored position, and then say something after arrival, using ~waitable syntax.
- ~walk <npc> <npc.anchor[spot4]>
- chat "I'm here!"
Usage Example
# Use to make a list of NPCs stored in a flag all move together, with a flocking radius based on the number of NPCs included.
- walk <player.flag[squad]> radius:<player.flag[squad].size> <player.location>
Groupentity
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/WalkCommand.java#L35