flag
out of 3906 meta-documentation entries...Name | Flag |
Related Guide Page | https://guide.denizenscript.com/guides/basics/flags.html |
Syntax | flag [<object>|...] [<name>([<#>])](:<action>)[:<value>] (expire:<time>) |
Short Description | Sets or modifies a flag on any flaggable object. |
Full Description | The flag command sets or modifies custom data values stored on any flaggable object (the server, a player/NPC/entity, a block location, ...).
See also flag system. This command supports data actions, see data actions. Flags by default are added permanently (or for the lifetime of the object they're attached to). You can optionally specify a system time the flag will expire at, using either a DurationTag or a TimeTag. If a DurationTag is used, it will be equivalent to: <util.time_now.add[<your_duration_here>]> |
Related Tags | <FlaggableObject.flag[<flag_name>]> Returns the specified flag from the flaggable object. (...)
<FlaggableObject.has_flag[<flag_name>]> Returns true if the flaggable object has the specified flag, otherwise returns false. (...)
<FlaggableObject.flag_expiration[<flag_name>]> Returns a TimeTag indicating when the specified flag will expire. (...)
<FlaggableObject.list_flags> Returns a list of the flaggable object's flags. (...)
<server.online_players_flagged[<flag_name>]> Returns a list of all online players with a specified flag set. (...)
<server.players_flagged[<flag_name>]> Returns a list of all players (online or offline) with a specified flag set. (...)
<server.spawned_npcs_flagged[<flag_name>]> Returns a list of all spawned NPCs with a specified flag set. (...)
<server.npcs_flagged[<flag_name>]> Returns a list of all NPCs with a specified flag set. (...)
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Group | core |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/core/FlagCommand.java#L88 |
Name | flag |
Object | ItemTag |
Input | ObjectTag |
Related Tags | <FlaggableObject.flag[<flag_name>]> Returns the specified flag from the flaggable object. (...)
<FlaggableObject.has_flag[<flag_name>]> Returns true if the flaggable object has the specified flag, otherwise returns false. (...)
<FlaggableObject.flag_expiration[<flag_name>]> Returns a TimeTag indicating when the specified flag will expire. (...)
<FlaggableObject.list_flags> Returns a list of the flaggable object's flags. (...)
|
Description | Modifies a flag on this item, using syntax similar to flag.
For example, 'flag:myflagname:!' will remove flag 'myflagname', or 'flag:myflagname:3' sets flag 'myflagname' to value '3'. |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemFlags.java#L119 |
Name | Flag System |
Description | The flag system is a core feature of Denizen, that allows for persistent data storage linked to objects.
"Persistent" means the data is still around even after a server restart or anything else, and is only removed when you choose for it to be removed. "Linked to objects" means rather than purely global values, flags are associated with a player, or an NPC, or a block, or whatever else. See also the guide page at https://guide.denizenscript.com/guides/basics/flags.html. For non-persistent temporary memory, see instead define. For more generic memory options, see yaml or sql. Flags can be sub-mapped with the '.' character, meaning a flag named 'x.y.z' is actually a flag 'x' as a MapTag with key 'y' as a MapTag with key 'z' as the final flag value. In other words, "<server.flag[a.b.c]>" is equivalent to "<server.flag[a].get[b].get[c]>" Server flags can be set by specifying 'server' as the object, essentially a global flag target, that will store data in the file "plugins/Denizen/server_flags.dat" Most unique object types are flaggable - refer to any given object type's language documentation for details. Most flag sets are handled by flag, however items are primarily flagged via inventory with the 'flag' argument. Any supported object type, including the 'server' base tag, can use the tags FlaggableObject.flag, FlaggableObject.has_flag, FlaggableObject.flag_expiration, FlaggableObject.list_flags. Additionally, flags be searched for with tags like server.online_players_flagged, server.players_flagged, server.spawned_npcs_flagged, server.npcs_flagged, ... Flags can also be required by script event lines, as explained at Script Event Switches. Item flags can also be used as a requirement in take. Note that some internal flags exist, and are prefixed with '__' to avoid conflict with normal user flags. This includes: - '__raw' and '__clear' which are part of a fake-flag system used for forcibly setting raw data to a flaggable object, - '__scripts', '__time', etc. which is where some object-type flags are stored inside of server flags, - '__interact_step' which is used for interact script steps, related to zap, - '__interact_cooldown' which is used for interact script cooldowns, related to cooldown. Flags have an expiration system, which is used by specifying a time at which they should expire (or via a duration which internally calculates the date/time of expiration by adding the duration input to the current date/time). Expirations are then *checked for* in flag tags - meaning, the flag tags will internally compare a stored date/time against the real current date/time, and if the flag's expiration time is in the past, the flag tag will return values equivalent to if the flag doesn't exist. There is no system actively monitoring for flag expirations or applying them. There is no event for expirations occurring, as they don't "occur" per se. In other words, it is correct to say a flag "is expired" or a flag "is not expired", but it is incorrect to say a flag "expires", as it is not an active action (though this wording can be convenient when speaking informally). Expired flags are sometimes 'cleaned up' (meaning, any expired flags get actually removed from internal storage), usually when a flag save file is loaded into the server. As a bonus feature-combo, it is possible to transmit sets of flags exactly in-place and reapply them, this is particular useful for example to synchronize player data across Bungee servers. To do this, you can read raw flag data with the tag FlaggableObject.flag_map and the '__raw' prefix in a flag command. For example:
|
Group | Denizen Scripting Language |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/core/FlagCommand.java#L34 |
Name | flag_map |
Object | EntityTag |
Input | MapTag |
Description | Internal setter for the EntityTag flag map.
Do not use this in scripts. |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityFlags.java#L73 |
Name | clean_flags |
Object | FlaggableObject |
Input | None |
Description | Cleans 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. |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/flags/AbstractFlagTracker.java#L123 |
Name | flag_map |
Object | ItemTag |
Input | MapTag |
Description | Internal-usage direct re-setter for the item's full raw flag data. |
Deprecated | Internal-usage only. |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemFlags.java#L107 |
Name | clean_flags |
Object | server |
Input | None |
Description | Cleans 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 |
|
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L1876 |
Name | FlaggableObject |
Prefix | None |
Identity Format | N/A |
Description | "FlaggableObject" is a pseudo-ObjectType that represents any type of object that can hold flags,
for use with 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 By | GriefPreventionClaimTag, 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 |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/flags/FlaggableObject.java#L7 |
Name | <AreaObject.blocks_flagged[<flag_name>]> |
Returns | ListTag(LocationTag) |
Description | Gets 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 |
|
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/AreaContainmentObject.java#L265 |
Name | <ChunkTag.blocks_flagged[<flag_name>]> |
Returns | ListTag(LocationTag) |
Description | Gets 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 |
|
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/ChunkTag.java#L716 |
Name | <FlaggableObject.flag_expiration[<flag_name>]> |
Returns | TimeTag |
Description | Returns a TimeTag indicating when the specified flag will expire.
See flag system. |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/flags/AbstractFlagTracker.java#L71 |
Name | <FlaggableObject.flag_map[<name>|...]> |
Returns | MapTag |
Description | Returns a raw map of the objects internal flag data for the flags with the given flag name. Names must be root names (no '.').
Output is a MapTag wherein each key is a flag name, and each value is a MapTag, containing keys '__value' and '__expiration', where '__value' contains the real object value. Output also may contain key '__clear', which is a ListTag of flags that were listed in input but weren't present in output. Using this without a parameter to get ALL flags is allowed exclusively for debug/testing reasons, and should never be used in a real script. See flag system. |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/flags/AbstractFlagTracker.java#L104 |
Name | <FlaggableObject.flag[<flag_name>]> |
Returns | ObjectTag |
Description | Returns the specified flag from the flaggable object.
If the flag is expired, will return null. Consider also using FlaggableObject.has_flag. See flag system. |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/flags/AbstractFlagTracker.java#L37 |
Name | <FlaggableObject.has_flag[<flag_name>]> |
Returns | ElementTag(Boolean) |
Description | Returns true if the flaggable object has the specified flag, otherwise returns false.
See flag system. |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/flags/AbstractFlagTracker.java#L55 |
Name | <FlaggableObject.list_flags> |
Returns | ListTag |
Description | Returns a list of the flaggable object's flags.
Note that this is exclusively for debug/testing reasons, and should never be used in a real script. See flag system. |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/flags/AbstractFlagTracker.java#L87 |
Name | <ItemTag.with_flag[<flag_set_action>].duration[<expire_duration>]> |
Returns | ItemTag |
Mechanism | ItemTag.flag |
Description | Returns a copy of the item with the specified flag data action (and the specified expiration duration) applied to it.
For example: <[item].with_flag[myflagname].duration[5m]> |
Group | properties |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemFlags.java#L68 |
Name | <ItemTag.with_flag[<flag_set_action>]> |
Returns | ItemTag |
Mechanism | ItemTag.flag |
Description | Returns a copy of the item with the specified flag data action applied to it.
For example: <[item].with_flag[myflagname]>, or <[item].with_flag[myflag:myvalue]>, or <[item].with_flag[mycounter:+:<[amount]>]> |
Group | properties |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemFlags.java#L53 |
Name | <LocationTag.find_blocks_flagged[<flag_name>].within[<#>]> |
Returns | ListTag(LocationTag) |
Description | Returns 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. |
Group | finding |
Source | https://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>)]> |
Returns | ObjectTag |
Description | Returns 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 |
|
Requires | Depenizen, WorldGuard |
Source | https://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>]> |
Returns | ObjectTag |
Description | Deprecated in favor of PlayerTag.worldguard_flag |
Requires | Depenizen, WorldGuard |
Deprecated | Use 'PlayerTag.worldguard_flag' |
Source | https://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/properties/worldguard/WorldGuardPlayerExtensions.java#L70 |
Name | <PlayerTag.worldguard.test_flag[<name>]> |
Returns | ObjectTag |
Description | Deprecated in favor of PlayerTag.worldguard_flag |
Requires | Depenizen, WorldGuard |
Deprecated | Use 'PlayerTag.worldguard_flag' |
Source | https://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/properties/worldguard/WorldGuardPlayerExtensions.java#L51 |
Name | <server.npcs_flagged[<flag_name>]> |
Returns | ListTag(NPCTag) |
Description | Returns a list of all NPCs with a specified flag set.
Can use "!<flag_name>" style to only return NPCs *without* the flag. |
Source | https://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>]> |
Returns | ListTag(PlayerTag) |
Description | Returns a list of all online players with a specified flag set.
Can use "!<flag_name>" style to only return players *without* the flag. |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L1302 |
Name | <server.players_flagged[<flag_name>]> |
Returns | ListTag(PlayerTag) |
Description | Returns 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. |
Source | https://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>]> |
Returns | ListTag(NPCTag) |
Description | Returns a list of all spawned NPCs with a specified flag set.
Can use "!<flag_name>" style to only return NPCs *without* the flag. |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L2335 |
Action Lines | mob move proximity
<entity> move proximity |
Triggers | when 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
|
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/npc/traits/MobproxTrait.java#L90 |
Name | Announce |
Syntax | announce [<text>] (to_ops/to_console/to_flagged:<flag_name>/to_permission:<node>) (format:<script>) |
Short Description | Announces a message for everyone online to read. |
Full Description | Announce 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 Format Script Containers using the 'format' argument, or with the "announce" format type (see 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 Tags | None
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Group | server |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/server/AnnounceCommand.java#L31 |
Name | Define |
Related Guide Page | https://guide.denizenscript.com/guides/basics/definitions.html |
Syntax | define [<id>](:<action>)[:<value>] |
Short Description | Creates a temporary variable inside a script queue. |
Full Description | Definitions 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 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 |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Synonyms (Search Aid) | definition |
Group | queue |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/queue/DefineCommand.java#L27 |
Name | Inventory |
Syntax | inventory [open/close/copy/move/swap/set/keep/exclude/fill/clear/update/adjust <mechanism>:<value>/flag <name>(:<action>)[:<value>] (expire:<time>)] (destination:<inventory>) (origin:<inventory>/<item>|...) (slot:<slot>) |
Short Description | Edits the inventory of a player, NPC, or chest. |
Full Description | Use this command to edit the state of inventories.
By default, the destination inventory is the current attached player's inventory. If you are copying, swapping, removing from (including via "keep" and "exclude"), adding to, moving, or filling inventories, you'll need both destination and origin inventories. Origin inventories may be specified as a list of ItemTags, but destinations must be actual InventoryTags. Using "open", "clear", or "update" only require a destination. "Update" also requires the destination to be a valid player inventory. Using "close" closes any inventory that the currently attached player has opened. The "adjust" option adjusts mechanisms on an item within a specific slot of an inventory (the "slot" parameter is required). Note that this is only for items, it does NOT adjust the inventory itself. Use adjust to adjust an inventory mechanism. The "flag" option sets a flag on items, similar to flag. See also flag system. The "update" option will refresh the client's view of an inventory to match the server's view, which is useful to workaround some sync bugs. Note that to add items to an inventory, you should usually use give, and to remove items from an inventory, you should usually use take. The slot argument can be any valid slot, see Slot Inputs. |
Related Tags | <PlayerTag.inventory> Returns a InventoryTag of the player's current inventory. (...)
<PlayerTag.enderchest> Gets the player's enderchest inventory. (...)
<PlayerTag.open_inventory> Gets the inventory the player currently has open. If the player has no open (...)
<NPCTag.inventory> Returns the InventoryTag of the NPC.
<LocationTag.inventory> Returns the InventoryTag of the block at the location. If the (...)
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Group | item |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/item/InventoryCommand.java#L95 |
Name | Mongo |
Syntax | mongo [id:<ID>] [connect:<uri> database:<database> collection:<collection>/disconnect/command:<map>/find:<map> (by_id:<id>)/insert:<map>/update:<update> new:<new> (upsert:true/{false})/use_database:<database>/use_collection:<collection>] |
Short Description | Interacts with a MongoDB server. |
Full Description | This command is used to interact with a MongoDB server.
MongoDB is a NoSQL database which uses concepts such as Documents and Collections to store data. MongoDB uses a form of JSON to represent its data. It can interact with localhost connections as well as hosted connections (such as MongoDB's Atlas) via a connection URI. Store your connection URI in the Denizen secrets file at 'plugins/Denizen/secrets.secret'. Refer to SecretTag for usage info. Mongo works as a document-oriented database, where data is stored in Documents. Documents are stored inside Collections. Collections can contain many Documents. Collections are then stored inside Databases. Usage of the mongo command should almost always be used as ~waitable (see ~waitable), as large queries and insertions can take a while to retrieve or send. You can open a mongo connection with connect:<uri>. You must specify a database and collection to connect to with the database:<database> and collection:<collection> options. You can change the database or collection you are connected to with use_database:<database> and use_collection:<collection> If a Database or Collection you connect to does not exist, once you insert some data then the Database or Collection will be created automatically. To insert Documents, use insert:<map>. To find a specific document from fragments of data, use find:<map>. You can include MongoDB's special query filters to further refine your query. If you want to search by a Document's ID, use by_id:id. To update a Document's data, use update:<update> with the old data, and new:<new> for the new data being updated. This will update every Document matched with the provided data. You can also include the upsert flag, to create a new Document if the Document you are trying to update does not already exist. As MongoDB offers a variety of commands, to run a command not wrapped here you can use command:<map>. TODO: When opening a connection, Mongo will output a lot of data to the console. There currently is not a way to turn this off. The mongo command is merely a wrapper, and further usage details should be gathered from an official MongoDB command reference rather than from Denizen command help. You can view the official mongo documentation here: https://www.mongodb.com/docs/manual/introduction/. You can view a list of commands that MongoDB supports here: https://www.mongodb.com/docs/manual/reference/command/. |
Related Tags | <util.mongo_connections> returns a ListTag of all the current Mongo connections.
<entry[saveName].result> returns the text result sent back from Mongo in a JSON format. JSON can be in an ElementTag or a ListTag depending on the action run.
<entry[saveName].inserted_id> returns the ID of the item that has been inserted via the `insert` action.
<entry[saveName].ok> returns the 'ok' value from the result. Used with the `command` action.
<entry[saveName].upserted_id> returns the ID the upserted item. Returned if the `upsert` bool is true when updating.
<entry[saveName].updated_count> returns the amount of Documents updated via the `update` action.
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Group | core |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/core/MongoCommand.java#L36 |
Name | npcbossbar |
Syntax | npcbossbar (remove) (color:<color>) (options:<option>|...) (range:<#>) (style:<style>) (title:<title>) (progress:<progress>) (view_permission:<permission>) (visible:<true/false>) |
Short Description | Controls or removes the linked NPC's bossbar. |
Full Description | Controls 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 |
|
Usage Example |
|
Usage Example |
|
Group | npc |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/npc/NPCBossBarCommand.java#L29 |
Name | Schematic |
Syntax | schematic [create/load/unload/rotate/save/flip_x/flip_y/flip_z/paste (fake_to:<player>|... fake_duration:<duration>) (noair) (mask:<material_matcher>)] [name:<name>] (filename:<name>) (angle:<#>) (<location>) (area:<area>) (delayed) (max_delay_ms:<#>) (entities) (flags) |
Short Description | Creates, loads, pastes, and saves schematics (Sets of blocks). |
Full Description | Creates, loads, pastes, and saves schematics. Schematics are files containing info about blocks and the order of those blocks.
Denizen offers a number of tools to manipulate and work with schematics. Schematics can be rotated, flipped, pasted with no air, or pasted with a delay. All schematic command usages must specify the "name" argument, which is a unique global identifier of the schematic in memory. This will be created by "create" or "load" options, and persist in memory until "unload" is used (or the server is restarted). The 'create' option requires an area and a center location as input. The area can be defined as any valid AreaObject, such as a CuboidTag. Note that all schematics are internally tracked as cuboids, and other area shapes will only constrain the copy region. Note that the block boundaries of non-cuboid regions are defined by whether the region definition contains the center of a block. This will create a new schematic in memory based on world data. The "rotate angle:#" and "flip_x/y/z" options will apply the change to the copy of the schematic in memory, to later be pasted or saved. This will rotate the set of blocks itself, the relative origin, and any directional blocks inside the schematic. Rotation angles must be a multiple of 90 degrees. When using 'paste', you can specify 'angle:#' to have that paste rotated, without rotating the original schematic. The "delayed" option makes the command non-instant. This is recommended for large schematics. For 'save', 'load', and 'rotate', this processes async to prevent server lockup. For 'paste' and 'create', this delays how many blocks can be processed at once, spread over many ticks. Optionally, specify 'max_delay_ms' to control how many milliseconds the 'delayed' set can run for in any given tick (defaults to 50) (for create/paste only). The "load" option by default will load '.schem' files. If no '.schem' file is available, will attempt to load a legacy '.schematic' file instead. For load and save, the "filename" option is available to specify the name of the file to look for. If unspecified, the filename will default to the same as the "name" input. The "noair" option skips air blocks in the pasted schematics- this means those air blocks will not replace any blocks in the target location. The "mask" option can be specified to limit what block types the schematic will be pasted over. When using "create" and "mask", any block that doesn't match the mask will become a structure void. The "fake_to" option can be specified to cause the schematic paste to be a fake (packet-based, see showfake) block set, instead of actually modifying the blocks in the world. This takes an optional duration as "fake_duration" for how long the fake blocks should remain. The "create" and "paste" options allow the "entities" argument to be specified - when used, entities will be copied or pasted. At current time, entity types included will be: Paintings, ItemFrames, ArmorStands. The "create" option allows the "flags" argument to be specified - when used, block location flags will be copied. The schematic command is ~waitable as an alternative to 'delayed' argument. Refer to ~waitable. To delete a schematic file, use server.delete_file. |
Related Tags | <schematic[<name>].height> Returns the height (Y) of the schematic.
<schematic[<name>].length> Returns the length (Z) of the schematic.
<schematic[<name>].width> Returns the width (X) of the schematic.
<schematic[<name>].block[<location>]> Returns the material for the block at the location in the schematic. (...)
<schematic[<name>].origin> Returns the origin location of the schematic.
<schematic[<name>].blocks> Returns the number of blocks in the schematic.
<schematic[<name>].exists> Returns whether the schematic exists.
<schematic[<name>].cuboid[<origin_location>]> Returns a cuboid of where the schematic would be if it was pasted at an origin.
<schematic.list> Returns a list of all loaded schematics.
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Group | world |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/world/SchematicCommand.java#L58 |
Name | SQL |
Syntax | sql [id:<ID>] [disconnect/connect:<server> (username:<username>) (password:<secret>) (ssl:true/{false})/query:<query>/update:<update>] |
Short Description | Interacts with a MySQL server. |
Full Description | This 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 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 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 sql.
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Group | core |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/core/SQLCommand.java#L35 |
Name | Take |
Syntax | take [iteminhand/cursoritem/bydisplay:<name>/bycover:<title>|<author>/slot:<slot>/flagged:<flag>/item:<matcher>] (quantity:<#>) (from:<inventory>) |
Short Description | Takes an item from the player. |
Full Description | Takes items from a player or inventory.
If the player or inventory does not have the item being taken, nothing happens. Using 'slot:' will take the items from that specific slot. Using 'flagged:' with a flag name will take items with the specified flag name, see flag system. Using 'iteminhand' will take from the player's held item slot. Using 'cursoritem' will take from the player's held cursor item (as in, one that's actively being picked up and moved in an inventory screen). Using 'bydisplay:' will take items with the specified display name. Using 'bycover:' will take a written book by the specified book title + author pair. Using 'raw_exact:' (Intentionally undocumented) will compare all raw details of an item exactly. This is almost always a bad idea to use. DO NOT USE. Using 'item:' will take items that match an advanced item matcher, using the system behind Advanced Object Matching. Flagged, Slot, ByDisplay, and Raw_Exact, all take a list as input to take multiple different item types at once. If no quantity is specified, exactly 1 item will be taken. Specifying a raw item without any matching method is considered unreliable and should be avoided. Optionally using 'from:' to specify a specific inventory to take from. If not specified, the linked player's inventory will be used. The options 'iteminhand' and 'cursoritem' require a linked player and will ignore the 'from:' inventory. To take xp from a player, use experience. To take money from a player, use money. |
Related Tags | <PlayerTag.item_in_hand> Returns the item the entity is holding, or air if none.
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Group | item |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/item/TakeCommand.java#L41 |
Name | Teleport |
Syntax | teleport (<entity>|...) [<location>] (cause:<cause>) (entity_options:<option>|...) (relative) (relative_axes:<axis>|...) (offthread_repeat:<#>) (offthread_yaw) (offthread_pitch) |
Short Description | Teleports the entity(s) to a new location. |
Full Description | Teleports the entity or entities to the new location.
Entities can be teleported between worlds using this command. You may optionally specify a teleport cause for player entities, allowing proper teleport event handling. When not specified, this is "PLUGIN". See teleport cause for causes. Instead of a valid entity, an unspawned NPC or an offline player may also be used. Optionally specify "relative" to use relative teleportation (Paper only). This is primarily useful only for players, but available for all entities. Relative teleports are smoother for the client when teleporting over short distances. Optionally, you may use "relative_axes:" to specify a set of axes to move relative on (and other axes will be treated as absolute), as any of "X", "Y", "Z", "YAW", "PITCH". Optionally, you may use "offthread_repeat:" with the relative arg when teleporting a player to smooth out the teleport with a specified number of extra async packets sent within a single tick. Optionally, specify "offthread_yaw" or "offthread_pitch" while using offthread_repeat to smooth the player's yaw/pitch to the new location's yaw/pitch. Optionally, specify additional teleport options using the 'entity_options:' arguments (Paper only). This allows things like retaining an open inventory when teleporting - see the links below for more information. See https://jd.papermc.io/paper/1.19/io/papermc/paper/entity/TeleportFlag.EntityState.html for all possible options. Note that the API this is based on is marked as experimental in Paper, and so may change in the future. |
Related Tags | <EntityTag.location> Returns the location of the entity. (...)
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Synonyms (Search Aid) | tp |
Group | entity |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/TeleportCommand.java#L39 |
Name | Yaml |
Syntax | yaml [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 Description | Edits YAML data, especially for YAML files. |
Full Description | Edits 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 flag. Use waitable syntax ("- ~yaml load:...") with load or savefile actions to avoid locking up the server during file IO. Refer to ~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 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 |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Group | file |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/file/YamlCommand.java#L44 |
Name | /ex command |
Description | The '/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 The Player and NPC Arguments. Examples: /ex narrate player:<[aplayer]> 'Your health is <player.health.formatted>.' /ex walk npc:<[some_npc]> <player.cursor_on> |
Group | Console Commands |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/utilities/command/ExCommandHandler.java#L34 |
Name | Advanced Object Matchables |
Description | Script events have a variety of matchable object inputs, and the range of inputs they accept may not always be obvious.
For example, an event might be "player clicks <block>"... what can "<block>" be filled with? "<block>" usually indicates that a LocationTag and/or MaterialTag will be matched against. This means you can specify any valid block material name, like "stone" or "air", like "on player clicks stone:" (will only run the event if the player is clicking stone) You can also use a catch-all such as "block", like "on player clicks block:" (will always run the event when the player clicks anything/anywhere) You can also use some more complicated matchables such as "vanilla_tagged:", like "on player clicks vanilla_tagged:mineable/axe:" (will run if the block is mineable with axes) (For more block-related options, refer to the LocationTag and MaterialTag matchers lists.) Many object types can be used for matchables, the valid inputs are unique depending on the object type involved. Some inputs don't refer to any object at all - they're just advanced matchers for some generic plaintext, for example "<cause>" implies an enumeration of causes will be matched against. Many inputs support advanced matchers. For details on that, see Advanced Object Matching. A common matchable type found among different objects is a Flag Matchable. This usually looks like "item_flagged:<flag>" This matches if the object has the specified flag, and fails to match if the object doesn't have that flag. You can specify multiple required flags with '|', like "item_flagged:a|b|c", which will match if-and-only-if the item has ALL the flags named. They can also be used to require the object does NOT have the flag with a "!" like "item_flagged:!<flag>". When using multiple flags with "|", the "!" is per-entry, so "item_flagged:!a|b" requires the item DOES have 'b' but does NOT have 'a'. Note also that in addition to events, tags often also have matchables as input params, usually documented like ".types[<matcher>]", with tag documentation specifying what matcher is used, or like "<material_matcher>" to indicate in this example specifically MaterialTag matchables are allowed. Not all object types have defined matchable options, and those that do list them in their ObjectType meta. For an example of this, check ItemTag. As a special case, "in:<area>" style matchable listings in event conform to the following option set: "biome:<name>": matches if the location is in a given biome, using advanced matchers. "cuboid" plaintext: matches if the location is in any noted cuboid. "ellipsoid" plaintext: matches if the location is in any noted ellipsoid. "polygon" plaintext: matches if the location is in any noted polygon. "chunk_flagged:<flag>": a Flag Matchable for ChunkTag flags. "area_flagged:<flag>": a Flag Matchable for AreaObject flags. Area note name: matches if an AreaObject note that matches the given advanced matcher contains the location. If none of the above are used, uses WorldTag matchers. |
Group | Object System |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/BukkitScriptEvent.java#L45 |
Name | Assignment Script Containers |
Description | Assignment 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 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:
Though note that almost always you should include the 'actions:' key, usually with the 'on assignment:' action (if using triggers). Refer to assignment. |
Group | Script Container System |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/containers/core/AssignmentScriptContainer.java#L13 |
Name | Command Script Containers |
Description | Command 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 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).
|
Group | Script Container System |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/containers/core/CommandScriptContainer.java#L28 |
Name | Data Actions |
Description | Several commands function as a way to modify data values,
including flag, yaml, and define. These commands each allow for a set of generic data change operations. These operations can be used with a syntax like "<key>:<action>:<value>" For example "mykey:+:5" will add 5 to the value at 'mykey'. The following actions are available: Actions that take no input value: Increment: '++': raises the value numerically up by 1. Example: - define x:++ Decrement: '--': lowers the value numerically down by 1. Example: - define x:-- Remove: '!': removes the value entirely. Example: - define x:! Actions that take an input value: Add: '+': adds the input value to the value at the key. Example: - define x:+:5 Subtract: '-': subtracts the input value from the value at the key. Example: - define x:-:5 Multiply: '*': multiplies the value at the key by the input value. Example: - define x:*:5 Divide: '/': divides the value at the key by the input value. Example: - define x:/:5 List insert: '->': adds the input value as a single new entry in the list (see also 'List split'). Example: - define x:->:new_value List remove: '<-': removes the input value from the list. Example: - define x:<-:old_value List split: '|': splits the input list and adds each value into an existing list at the key. Example: - define x:|:a|b|c Special cases: In some commands, specifying no action or input value will automatically set the key's value to 'true'. Setting a '<key>:<value>' without an action will set the key to the exact value. Be careful to not input a list like this, use 'split to new' instead. Note that the <key> input may take an index input as well, for example "mykey[3]:value". This also works with most actions. That is, for example: "mykey[3]:--" will decrement the third item in the list at 'mykey'. This syntax may also be used to remove the entry at a specified index, for example "mykey[3]:<-" The index can also be "last" to automatically use the last entry in the list as the target. |
Group | Useful Lists |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/utilities/data/DataActionType.java#L5 |
Name | Economy Script Containers |
Description | Economy script containers
Economy script containers provide a Vault economy, which can be used in scripts by PlayerTag.money and 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).
|
Group | Script Container System |
Requires | Vault |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/containers/core/EconomyScriptContainer.java#L34 |
Name | Entity Script Containers |
Description | Entity 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.
MORE MECHANISM OPTIONS ARE LISTED HERE: https://meta.denizenscript.com/Docs/Mechanisms/entitytag. |
Group | Script Container System |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/containers/core/EntityScriptContainer.java#L27 |
Name | Health Trait |
Description | By 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 EntityTag.health EntityTag.formatted_health EntityTag.health_max EntityTag.health_percentage NPCTag.has_trait[health] Related Mechanisms EntityTag.health EntityTag.max_health Related Commands heal health vulnerable Related Actions on damage on damaged on no damage trigger |
Group | NPC Traits |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/npc/traits/HealthTrait.java#L29 |
Name | Item Script Containers |
Description | Item script containers are an easy way to pre-define custom items for use within scripts. Item
scripts work with the ItemTag object, and can be fetched with the Object Fetcher by using the ItemTag constructor ItemTag_script_name. Example: - drop <player.location> super_dooper_diamond The following is the format for the container. Except for the 'material' key (and the dScript required 'type' key), all other keys are optional.
|
Group | Script Container System |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/containers/core/ItemScriptContainer.java#L30 |
Name | MythicMobs Bridge |
Description | In addition to the tags, commands, and events found by searching for "mythicmobs" throughout the meta documentation,
Depenizen adds 4 new Denizen matchers, and additional features to Mythic Mobs: 2 Targeters, and a Condition. Depenizen provides additional EntityTag and ItemTag matchers to match MythicMobs mobs/items: - "mythic_mob" plaintext EntityTag matcher, matches if the entity is a mythic mob. - "mythic_mob:<MythicMobID>" EntityTag matcher, matches if the entity is a mythic mob, and its ID matches the advanced matcher specified. - "mythic_item" plaintext ItemTag matcher, matches if the item is a mythic item. - "mythic_item:<MythicItemID>" ItemTag matcher, matches if the item is a mythic item, and its ID matches the advanced matcher specified. Depenizen provides two additional targeters via the MythicMobs API: @DenizenEntity is an entity-based targeter, @DenizenLocation is a location-based targeter. Both targeters can parse tags; they accept input of either an EntityTag or LocationTag respectively. Both targeters also support returning ListTags containing their respective tag types. Both targeters provide <context.entity> as an EntityTag of the caster. Conditions provide different contexts depending on their usage. The syntax for calling a Denizen tag as a condition is DenizenCondition. The tag should return an ElementTag of a boolean value (true or false). <context.location> is available for location-based checks, <context.entity> is available for entity-based and caster-based checks, and <context.target> is available for target-based checks. NOTE: TriggerConditions are NOT currently supported. Note as well that many parts of MythicMobs configurations allow usage of PlaceholderAPI, which means you can use the "denizen_" placeholder to read tags in any such parts, refer to PlaceholderAPI Bridge for more information. Usage Examples Example 1: @DenizenEntity{tag=<context.entity.location.find_players_within[30].filter[has_flag[marked]]>} Example 2: @DenizenLocation{tag=<context.entity.location.find.surface_blocks.within[30].random[5]>} Example 3: @DenizenEntity{tag=<proc[SomeProcScript]>} Conditions: - denizencondition{tag=<context.entity.location.find_players_within[30].is_empty.not>} |
Group | Depenizen Bridges |
Requires | Depenizen, MythicMobs |
Source | https://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/utilities/mythicmobs/MythicMobsLoaders.java#L20 |
Name | ObjectTags |
Description | ObjectTags are a system put into place by Denizen that make working with things, or 'objects',
in Minecraft and Denizen easier. Many parts of scripts will require some kind of object as an argument, identifier/type, or such as in world events, part of an event name. The ObjectTags notation system helps both you and Denizen know what type of objects are being referenced and worked with. So when should you use ObjectTags? In arguments, event names, replaceable tags, configs, flags, and more! If you're just a beginner, you've probably been using them without even realizing it! ObjectTag is a broader term for a 'type' of object that more specifically represents something, such as a LocationTag or ScriptTag, often times just referred to as a 'location' or 'script'. Denizen employs many object types that you should be familiar with. You'll notice that many times objects are referenced with their 'ObjectTag notation' which is in the format of 'x@', the x being the specific notation of an object type. Example: player objects use the p@ notation, and locations use l@. This notation is automatically generated when directly displaying objects, or saving them into data files. It should never be manually typed into a script. Let's take the tag system, for example. It uses the ObjectTags system pretty heavily. For instance, every time you use <player.name> or <npc.id>, you're using a ObjectTag, which brings us to a simple clarification: Why <player.name> and not <PlayerTag.name>? That's because Denizen allows Players, NPCs and other 'in-context objects' to be linked to certain scripts. In short, <player> already contains a reference to a specific player, such as the player that died in a world event 'on player dies'. <PlayerTag.name> is instead the format for documentation, with "PlayerTag" simply indicating 'any player object here'. ObjectTags can be used to CREATE new instances of objects, too! Though not all types allow 'new' objects to be created, many do, such as ItemTags. With the use of tags, it's easy to reference a specific item, say -- an item in the Player's hand -- items are also able to use a constructor to make a new item, and say, drop it in the world. Take the case of the command/usage '- drop diamond_ore'. The item object used is a brand new diamond_ore, which is then dropped by the command to a location of your choice -- just specify an additional location argument. There's a great deal more to learn about ObjectTags, so be sure to check out each object type for more specific information. While all ObjectTags share some features, many contain goodies on top of that! |
Group | Object System |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/utilities/CommonRegistries.java#L29 |
Name | PlaceholderAPI Bridge |
Description | Using Depenizen with PlaceholderAPI allows you to use placeholder and 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]>% |
Group | Depenizen Bridges |
Requires | Depenizen, PlaceholderAPI |
Source | https://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/bridges/PlaceholderAPIBridge.java#L25 |
Name | Procedure Script Containers |
Description | Procedure script containers are used to define a script that can be ran through a tag.
Generally called via proc or 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.
|
Group | Script Container System |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/containers/core/ProcedureScriptContainer.java#L9 |
Name | Script Event Switches |
Description | Modern 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 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 script event priority), All Bukkit events have bukkit priority switches (see bukkit event priority), All cancellable script events have cancellation switches (see script event cancellation). See also Advanced Object Matching. |
Group | Script Events |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/events/ScriptEvent.java#L236 |
Name | Tag Fallbacks |
Description | Tag 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?
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:
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. |
Group | Tag System |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/tags/Attribute.java#L471 |
Name | The Global If Argument |
Description | The "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:
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 objecttag.is.to or elementtag.and or elementtag.or. |
Group | Script Command System |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/CommandExecutor.java#L50 |
Name | The Player and NPC Arguments |
Description | The "player:<player>" and "npc:<npc>" arguments are special meta-arguments that are available for all commands, but are only useful for some.
They are written like: - give stick player:<server.flag[some_player]> or: - sit npc:<entry[save].created_npc> Denizen tracks a "linked player" and a "linked NPC" in queues and the commands within. Many commands automatically operate on the linked player/NPC default or exclusively (for example, "give" defaults to giving items to the linked player but that can be changed with the "to" argument, "sit" exclusively makes the linked NPC sit, and that cannot be changed except by the global NPC argument). When the player argument is used, it sets the linked player for the specific command it's on. This is only useful for commands that default to operating on the linked player. This can also be useful with the "run" command to link a specific player to the new queue. The NPC argument is essentially equivalent to the player argument, but for the linked NPC instead of the linked player. These arguments will also affect tags (mainly "<player>" and "<npc>") in the same command line (regardless of argument order). If you need to use the original player/NPC in a tag on the same line, use the define command to track it. You can also modify the linked player or NPC for an entire queue using the fake-definitions '__player' and '__npc', for example:
|
Group | Script Command System |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/utilities/implementation/DenizenCoreImplementation.java#L107 |
Name | custom_data |
Object | ItemTag |
Input | MapTag |
Related Tags | <ItemTag.custom_data> (Property) Returns an item's custom NBT data, if any. (...)
|
Description | (Property) Sets an item's custom NBT data, if any.
The map is in NBT format, see Raw NBT Encoding. This does not include any normal vanilla data (enchantments, lore, etc.), just extra custom data. This is useful for integrating with items from external systems (such as custom items from plugins), but item flags should be preferred otherwise. Provide no input to clear custom data. |
Group | Properties |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemCustomData.java#L13 |
Name | unbreakable |
Object | ItemTag |
Input | ElementTag(Boolean) |
Related Tags | <ItemTag.unbreakable> Returns whether an item has the unbreakable flag.
|
Description | Changes whether an item has the unbreakable item flag. |
Generated Example |
|
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemUnbreakable.java#L70 |
Name | hide_entities |
Object | PlayerTag |
Input | ElementTag |
Description | Hides a matchable type of entity from the player. Can use any advanced entity matchers per Advanced Object Matching.
To hide a specific entity from the player, use PlayerTag.hide_entity. To remove hide sets, use PlayerTag.unhide_entities. Note that dynamic matchables like 'entity_flagged' will behave in unexpected ways when dynamically changing. |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L3368 |
Name | BiomeTag |
Prefix | b@ |
Base Type | ElementTag |
Implements | FlaggableObject |
Identity Format | The identity format for biomes is a world name, then a comma, then the biome key. For example: 'hub,desert', or 'space,minecraft:desert'. |
Description | A 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" |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/BiomeTag.java#L33 |
Name | ChunkTag |
Prefix | ch@ |
Base Type | ElementTag |
Implements | FlaggableObject |
Identity Format | The identity format for chunks is <x>,<z>,<world>
For example, 'ch@5,3,world'. |
Description | A 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. |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/ChunkTag.java#L33 |
Name | CuboidTag |
Prefix | cu@ |
Base Type | ElementTag |
Implements | FlaggableObject, AreaObject |
Identity Format | The 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'. |
Description | A 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. |
Matchable | Refer to areaobject's matchable list. |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/CuboidTag.java#L35 |
Name | DiscordBotTag |
Prefix | discord@ |
Base Type | ElementTag |
Implements | FlaggableObject |
Identity Format | The identity format for Discord bots is the bot ID (as chosen in discord).
For example: mybot |
Description | A 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 |
Requires | dDiscordBot |
Source | https://github.com/DenizenScript/dDiscordBot/blob/master/src/main/java/com/denizenscript/ddiscordbot/objects/DiscordBotTag.java#L19 |
Name | DiscordChannelTag |
Prefix | discordchannel@ |
Base Type | ElementTag |
Implements | FlaggableObject |
Identity Format | The identity format for Discord channels is the bot ID (optional), followed by the channel ID (required).
For example: 1234 Or: mybot,1234 |
Description | A 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" |
Requires | dDiscordBot |
Source | https://github.com/DenizenScript/dDiscordBot/blob/master/src/main/java/com/denizenscript/ddiscordbot/objects/DiscordChannelTag.java#L28 |
Name | DiscordCommandTag |
Prefix | discordcommand@ |
Base Type | ElementTag |
Implements | FlaggableObject |
Identity Format | The 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 |
Description | A 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" |
Requires | dDiscordBot |
Source | https://github.com/DenizenScript/dDiscordBot/blob/master/src/main/java/com/denizenscript/ddiscordbot/objects/DiscordCommandTag.java#L25 |
Name | DiscordGroupTag |
Prefix | discordgroup@ |
Base Type | ElementTag |
Implements | FlaggableObject |
Identity Format | The identity format for Discord groups is the bot ID (optional), followed by the guild ID (required).
For example: 1234 Or: mybot,1234 |
Description | A 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" |
Requires | dDiscordBot |
Source | https://github.com/DenizenScript/dDiscordBot/blob/master/src/main/java/com/denizenscript/ddiscordbot/objects/DiscordGroupTag.java#L27 |
Name | DiscordInteractionTag |
Prefix | discordinteraction@ |
Base Type | ElementTag |
Implements | FlaggableObject |
Identity Format | The identity format for Discord interactions is the bot ID, followed by the interaction ID.
For example: mybot,5678 |
Description | A 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. |
Requires | dDiscordBot |
Source | https://github.com/DenizenScript/dDiscordBot/blob/master/src/main/java/com/denizenscript/ddiscordbot/objects/DiscordInteractionTag.java#L28 |
Name | DiscordMessageTag |
Prefix | discordmessage@ |
Base Type | ElementTag |
Implements | FlaggableObject |
Identity Format | The 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 |
Description | A 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" |
Requires | dDiscordBot |
Source | https://github.com/DenizenScript/dDiscordBot/blob/master/src/main/java/com/denizenscript/ddiscordbot/objects/DiscordMessageTag.java#L26 |
Name | DiscordReactionTag |
Prefix | discordreaction@ |
Base Type | ElementTag |
Implements | FlaggableObject |
Identity Format | The 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. |
Description | A 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" |
Requires | dDiscordBot |
Source | https://github.com/DenizenScript/dDiscordBot/blob/master/src/main/java/com/denizenscript/ddiscordbot/objects/DiscordReactionTag.java#L27 |
Name | DiscordRoleTag |
Prefix | discordrole@ |
Base Type | ElementTag |
Implements | FlaggableObject |
Identity Format | The 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 |
Description | A 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" |
Requires | dDiscordBot |
Source | https://github.com/DenizenScript/dDiscordBot/blob/master/src/main/java/com/denizenscript/ddiscordbot/objects/DiscordRoleTag.java#L26 |
Name | DiscordUserTag |
Prefix | discorduser@ |
Base Type | ElementTag |
Implements | FlaggableObject |
Identity Format | The identity format for Discord users is the bot ID (optional), followed by the user ID (required).
For example: 1234 Or: mybot,1234 |
Description | A 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" |
Requires | dDiscordBot |
Source | https://github.com/DenizenScript/dDiscordBot/blob/master/src/main/java/com/denizenscript/ddiscordbot/objects/DiscordUserTag.java#L28 |
Name | EllipsoidTag |
Prefix | ellipsoid@ |
Base Type | ElementTag |
Implements | FlaggableObject, AreaObject |
Identity Format | The 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'. |
Description | An 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. |
Matchable | Refer to areaobject's matchable list. |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EllipsoidTag.java#L29 |
Name | EnchantmentTag |
Prefix | enchantment@ |
Base Type | ElementTag |
Implements | FlaggableObject |
Identity Format | The identity format for enchantments is the vanilla ID, Denizen ID, or full key. Can also be constructed by Denizen script name.
For example, 'enchantment@sharpness', 'enchantment@my_custom_ench', or 'enchantment@otherplugin:customench'. |
Description | An EnchantmentTag represents an item enchantment abstractly (the enchantment itself, like 'sharpness', which *can be* applied to an item, as opposed to the specific reference to an enchantment on a specific item).
For enchantment names, check https://minecraft.wiki/w/Enchanting#Summary_of_enchantments. Note spaces should swapped to underscores, so for example "Aqua Affinity" becomes "aqua_affinity". This object type is flaggable. Flags on this object type will be stored in the server saves file, under special sub-key "__enchantments" |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EnchantmentTag.java#L28 |
Name | EntityTag |
Prefix | e@ |
Base Type | ElementTag |
Implements | FlaggableObject, PropertyHolderObject |
Identity Format | The identity format for entities is a spawned entity's UUID, or an entity type.
For example, 'e@abc123' or 'e@zombie'. |
Description | An EntityTag represents a spawned entity, or a generic entity type.
Note that players and NPCs are valid EntityTags, but are generally represented by the more specific PlayerTag and NPCTag objects. Note that a spawned entity can be a living entity (a player, NPC, or mob) or a nonliving entity (a painting, item frame, etc). This object type is flaggable. Flags on this object type will be stored in the world chunk files as a part of the entity's NBT. |
Matchable | EntityTag matchers, sometimes identified as "<entity>", "<projectile>", or "<vehicle>":
"entity" plaintext: always matches. "player" plaintext: matches any real player (not NPCs). "npc" plaintext: matches any Citizens NPC. "vehicle" plaintext: matches for any vehicle type (minecarts, boats, horses, etc). "fish" plaintext: matches for any fish type (cod, pufferfish, etc). "projectile" plaintext: matches for any projectile type (arrow, trident, fish hook, snowball, etc). "hanging" plaintext: matches for any hanging type (painting, item_frame, etc). "monster" plaintext: matches for any monster type (creepers, zombies, etc). "animal" plaintext: matches for any animal type (pigs, cows, etc). "mob" plaintext: matches for any mob type (creepers, pigs, etc). "living" plaintext: matches for any living type (players, pigs, creepers, etc). "vanilla_tagged:<tag_name>": matches if the given vanilla tag applies to the entity. Allows advanced matchers, for example: "vanilla_tagged:axolotl_*". "entity_flagged:<flag>": a Flag Matchable for EntityTag flags. "player_flagged:<flag>": a Flag Matchable for PlayerTag flags (will never match non-players). "npc_flagged:<flag>": a Flag Matchable for NPCTag flags (will never match non-NPCs). "npc_<type>": matches if the NPC is the given entity type (like "npc_cow" or "npc_mob" or "npc_player"). Any entity type name: matches if the entity is of the given type, using advanced matchers. |
Extended By | NPCTag, PlayerTag |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EntityTag.java#L68 |
Name | GriefPreventionClaimTag |
Prefix | gpclaim@ |
Base Type | ElementTag |
Implements | FlaggableObject |
Identity Format | The identity format for claims is <claim_id>
For example, 'gpclaim@1234'. |
Description | A 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" |
Requires | Depenizen, GriefPrevention |
Source | https://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/objects/griefprevention/GriefPreventionClaimTag.java#L27 |
Name | InventoryTag |
Prefix | in@ |
Base Type | ElementTag |
Implements | FlaggableObject, PropertyHolderObject |
Identity Format | The identity format for inventories is the classification type of inventory to use. All other data is specified through properties. |
Description | An InventoryTag represents an inventory, generically or attached to some in-the-world object.
Inventories can be generically designed using inventory script containers, and can be modified using the inventory command. Valid inventory type classifications: "npc", "player", "crafting", "enderchest", "workbench", "entity", "location", "generic" This object type can be noted. This object type is flaggable when it is noted. Flags on this object type will be stored in the notables.yml file. |
Matchable | InventoryTag matchers, sometimes identified as "<inventory>":
"inventory" plaintext: always matches. "note" plaintext: matches if the inventory is noted. Inventory script name: matches if the inventory comes from an inventory script of the given name, using advanced matchers. Inventory note name: matches if the inventory is noted with the given name, using advanced matchers. Inventory type: matches if the inventory is of a given type, using advanced matchers. "inventory_flagged:<flag>": a Flag Matchable for InventoryTag flags. "gui" plaintext: matches if the inventory is a GUI (see inventory script containers). |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java#L59 |
Name | ItemTag |
Prefix | i@ |
Base Type | ElementTag |
Implements | FlaggableObject, PropertyHolderObject |
Identity Format | The identity format for items is the basic material type name, or an item script name. Other data is specified in properties.
For example, 'i@stick'. |
Description | An ItemTag represents a holdable item generically.
ItemTags are temporary objects, to actually modify an item in an inventory you must add the item into that inventory. ItemTags do NOT remember where they came from. If you read an item from an inventory, changing it does not change the original item in the original inventory. You must set it back in. Find a list of valid materials at: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html Note that some materials on that list are exclusively for use with blocks, and cannot be held as items. This object type is flaggable. Flags on this object type will be stored in the item NBT. |
Matchable | ItemTag matchers, sometimes identified as "<item>", often seen as "with:<item>":
"potion": plaintext: matches if the item is any form of potion item. "script": plaintext: matches if the item is any form of script item. "item_flagged:<flag>": A Flag Matcher for item flags. "item_enchanted:<enchantment>": matches if the item is enchanted with the given enchantment name (excluding enchantment books). Allows advanced matchers. "raw_exact:<item>": matches based on exact raw item data comparison (almost always a bad idea to use). Item property format: will validate that the item material matches and all directly specified properties also match. Any properties not specified won't be checked. for example "stick[display=Hi]" will match any 'stick' with a displayname of 'hi', regardless of whether that stick has lore or not, or has enchantments or not, or etc. Item script names: matches if the item is a script item with the given item script name, using advanced matchers. If none of the above are used, uses MaterialTag matchables. Refer to MaterialTag matchable list above. Note that "item" plaintext is always true. |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/ItemTag.java#L56 |
Name | JavaReflectedObjectTag |
Prefix | reflected@ |
Base Type | ElementTag |
Identity Format | The identity format for JavaReflectedObjectTag is a random UUID that is associated with a temporary lookup to reduce reparsing risk. |
Description | JavaReflectedObjectTag 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. |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/JavaReflectedObjectTag.java#L20 |
Name | LocationTag |
Prefix | l@ |
Base Type | ElementTag |
Implements | FlaggableObject, VectorObject |
Identity Format | The 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' |
Description | A 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. |
Matchable | LocationTag 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 MaterialTag matchable list. |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L65 |
Name | MaterialTag |
Prefix | m@ |
Base Type | ElementTag |
Implements | FlaggableObject, PropertyHolderObject |
Identity Format | The identity format for materials is the material type name.
For example, 'm@stick'. |
Description | A MaterialTag represents a material (a type of block or item).
Block materials may sometimes also contain property data, for specific values on the block material such as the growth stage of a plant or the orientation of a stair block. Material types: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html. This object type is flaggable. Flags on this object type will be stored in the server saves file, under special sub-key "__materials" |
Matchable | MaterialTag matchers, sometimes identified as "<material>", associated with "<block>":
"material" plaintext: always matches. "block" plaintext: matches if the material is a block-type material. "item" plaintext: matches if the material is an item-type material. "material_flagged:<flag>": a Flag Matchable for MaterialTag flags. "vanilla_tagged:<tag_name>": matches if the given vanilla tag applies to the material. Allows advanced matchers, for example: "vanilla_tagged:mineable*". If none of the above are used, uses an advanced matcher for the material name, like "stick". |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/MaterialTag.java#L37 |
Name | NationTag |
Prefix | nation@ |
Base Type | ElementTag |
Implements | FlaggableObject |
Identity Format | The identity format for nations is <nation_uuid>
For example, 'nation@123-abc'. |
Description | A 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" |
Requires | Depenizen, Towny |
Source | https://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/objects/towny/NationTag.java#L27 |
Name | NPCTag |
Prefix | n@ |
Base Type | EntityTag |
Implements | FlaggableObject |
Identity Format | The 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' |
Description | An 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. |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/NPCTag.java#L51 |
Name | PlayerTag |
Prefix | p@ |
Base Type | EntityTag |
Implements | FlaggableObject |
Identity Format | The identity format for players is the UUID of the relevant player. |
Description | A 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. |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L63 |
Name | PluginTag |
Prefix | pl@ |
Base Type | ElementTag |
Implements | FlaggableObject |
Identity Format | The identity format for plugins is the plugin's registered name.
For example, 'pl@Denizen'. |
Description | A 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" |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PluginTag.java#L24 |
Name | PolygonTag |
Prefix | polygon@ |
Base Type | ElementTag |
Implements | FlaggableObject, AreaObject |
Identity Format | The 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). |
Description | A 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. |
Matchable | Refer to areaobject's matchable list. |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PolygonTag.java#L29 |
Name | QueueTag |
Prefix | q@ |
Base Type | ElementTag |
Implements | FlaggableObject |
Identity Format | The identity format for queues is simply the queue ID. |
Description | A 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. |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/QueueTag.java#L21 |
Name | ScriptTag |
Prefix | s@ |
Base Type | ElementTag |
Implements | FlaggableObject |
Identity Format | The identity format for scripts is simply the script name. |
Description | An 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" |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ScriptTag.java#L84 |
Name | TimeTag |
Prefix | time@ |
Base Type | ElementTag |
Implements | FlaggableObject |
Identity Format | The 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' |
Description | A 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" |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/TimeTag.java#L25 |
Name | TownTag |
Prefix | town@ |
Base Type | ElementTag |
Implements | FlaggableObject |
Identity Format | The identity format for towns is <town_uuid>
For example, 'town@123-abc'. |
Description | A 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" |
Requires | Depenizen, Towny |
Source | https://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/objects/towny/TownTag.java#L29 |
Name | WorldTag |
Prefix | w@ |
Base Type | ElementTag |
Implements | FlaggableObject |
Identity Format | The 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. |
Description | A 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". |
Matchable | WorldTag 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. |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/WorldTag.java#L43 |
Name | <ItemTag.custom_data> |
Returns | MapTag |
Mechanism | ItemTag.custom_data |
Description | (Property) Returns an item's custom NBT data, if any.
The map is in NBT format, see Raw NBT Encoding. This does not include any normal vanilla data (enchantments, lore, etc.), just extra custom data. This is useful for integrating with items from external systems (such as custom items from plugins), but item flags should be preferred otherwise. |
Example |
|
Group | Properties |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemCustomData.java#L13 |
Name | <ItemTag.unbreakable> |
Returns | ElementTag(Boolean) |
Mechanism | ItemTag.unbreakable |
Description | Returns whether an item has the unbreakable flag. |
Generated Example |
|
Group | properties |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemUnbreakable.java#L44 |
Name | BossBar |
Syntax | bossbar ({auto}/create/update/remove) [<id>] (players:<player>|...) (title:<title>) (progress:<#.#>) (color:<color>) (style:<style>) (options:<option>|...) (uuid:<uuid>) |
Short Description | Shows players a boss bar. |
Full Description | Displays 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 bossbar.
<server.bossbar_viewers[<bossbar_id>]> Returns a list of players that should be able to see the given bossbar ID from bossbar.
<PlayerTag.bossbar_ids> Returns a list of all bossbars from bossbar that this player can see. (...)
<entry[saveName].bar_uuid> returns the bossbar's UUID.
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Group | server |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/server/BossBarCommand.java#L34 |
Name | Chat |
Syntax | chat [<text>] (no_target/targets:<entity>|...) (talkers:<entity>|...) (range:<#.#>) |
Short Description | Causes an NPC/NPCs to send a chat message to nearby players. |
Full Description | Chat 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:
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 Tags | None
|
Usage Example |
|
Usage Example |
|
Synonyms (Search Aid) | say, speak |
Group | player |
Requires | Citizens |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/player/ChatCommand.java#L43 |
Name | ClientRun |
Syntax | clientrun [<script>] (path:<name>) (def.<name>:<value>) (defmap:<map>) |
Short Description | Runs a client script on a Clientizen client. |
Full Description | Runs 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 Tags | None
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Group | Depenizen |
Requires | Depenizen, Clientizen |
Source | https://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/clientizen/commands/ClientRunCommand.java#L24 |
Name | Engage |
Syntax | engage (<duration>) (player) |
Short Description | Temporarily disables an NPCs toggled interact script-container triggers. |
Full Description | Engaging an NPC will temporarily disable any interact script-container triggers.
To reverse this behavior, use either the disengage command, or specify a duration in which the engage should timeout. Specifying an engage without a duration will render the NPC engaged until a disengage is used on the NPC. Engaging an NPC by default affects all players attempting to interact with the NPC. You can optionally specify 'player' to only affect the linked player. While engaged, all triggers and actions associated with triggers will not 'fire', except the 'on unavailable' assignment script-container action, which will fire for triggers that were enabled previous to the engage command. Engage can be useful when NPCs are carrying out a task that shouldn't be interrupted, or to provide a good way to avoid accidental 'retrigger'. See Disengage |
Related Tags | <NPCTag.engaged> Returns whether the NPC is currently engaged. (...)
|
Usage Example |
|
Usage Example |
|
Group | npc |
Requires | Citizens |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/npc/EngageCommand.java#L30 |
Name | If |
Related Guide Page | https://guide.denizenscript.com/guides/basics/if-command.html |
Syntax | if [<value>] (!)(<operator> <value>) (&&/|| ...) [<commands>] |
Short Description | Compares values, and runs a subset of commands if they match. |
Full Description | Compares values, and runs a subset of commands if they match.
Works with the else command, which handles alternatives for when the comparison fails. The if command is equivalent to the English phrasing "if something is true, then do the following". Values are compared using the comparable system. See operator for information. Comparisons may be chained together using the symbols '&&' and '||' or their text equivalents 'and' and 'or'. '&&' means "and", '||' means "or". So, for example "if <[a]> && <[b]>:" requires both a AND b to be true. "if <[a]> and <[b]>:" also requires both a AND b to be true. The "or" is inclusive, meaning "if <[a]> || <[b]>:" will pass for any of the following: a = true, b = true a = true, b = false a = false, b = true but will fail when a = false and b = false. Sets of comparisons may be grouped using ( parens ) as separate arguments. So, for example "if ( <[a]> && <[b]> ) || <[c]>", or "if ( <[x]> or <[y]> or <[z]> ) and ( <[a]> or <[b]> or <[c]> )" Grouping is REQUIRED when using both '&&' and '||' in one line. Otherwise, groupings should not be used at all. Boolean inputs and groups both support negating with the '!' symbol as a prefix. This means you can do "if !<[a]>" to say "if a is NOT true". Similarly, you can do "if !( <[a]> || <[b]> )", though be aware that per rules of boolean logic, that example is the exactly same as "if !<[a]> && !<[b]>". You can also use keyword "not" as its own argument to negate a boolean or an operator. For example, "if not <[a]>:" will require a to be false, and "if <[a]> not equals <[b]>:" will require that 'a' does not equal 'b'. When not using a specific comparison operator, true vs false will be determined by Truthiness, see ObjectTag.is_truthy for details. For example, "- if <player||null>:" will pass if a player is linked, valid, and online. |
Related Tags | <ObjectTag.is[<operator>].to[<element>]> Takes an operator, and compares the first object to the given second object. (...)
<ObjectTag.is[<operator>].than[<element>]> Takes an operator, and compares the first object to the given second object. (...)
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Group | queue |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/queue/IfCommand.java#L28 |
Name | Queue |
Syntax | queue (<queue>) [clear/stop/pause/resume/delay:<duration>] |
Short Description | Modifies the current state of a script queue. |
Full Description | Allows 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 stop instead. Using the "stop" argument will force the queue to immediately stop running. When trying to stop the current queue, use 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 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 |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Group | queue |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/queue/QueueCommand.java#L22 |
Name | Walk |
Syntax | walk (<entity>|...) [<location>/stop] (speed:<#.#>) (auto_range) (radius:<#.#>) (lookat:<location>) |
Short Description | Causes an entity or list of entities to walk to another location. |
Full Description | Causes 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 ~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 |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Group | entity |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/WalkCommand.java#L35 |