Name | Adjust |
Related Guide Page | https://guide.denizenscript.com/guides/basics/mechanisms.html |
Syntax | adjust [<ObjectTag>/def:<name>|...] [<mechanism>](:<value>) |
Short Description | Adjusts an object's mechanism. |
Full Description | Many object tag types contains options and properties that need to be adjusted.
Denizen employs a mechanism interface to deal with those adjustments. To easily accomplish this, use this command with a valid object mechanism, and sometimes accompanying value. Specify "def:<name>" as an input to adjust a definition and automatically save the result back to the definition. You can optionally adjust a MapTag of mechanisms to values. To adjust an item in an inventory, use inventory, as '- inventory adjust slot:<#> <mechanism>:<value>'. Note that that is only for items, not actual inventories. To adjust an actual InventoryTag mechanism, you should still use the normal 'adjust' command, not 'inventory adjust'. |
Related Tags | <entry[saveName].result> returns the adjusted object.
<entry[saveName].result_list> returns a ListTag of adjusted objects.
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Synonyms (Search Aid) | mechanism |
Group | core |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/core/AdjustCommand.java#L31 |
Name | CustomEvent |
Syntax | customevent [id:<id>] (context:<map>) |
Short Description | Fires a custom world script event. |
Full Description | Fires a custom world script event.
Input is an ID (the name of your custom event, choose a constant name to use), and an optional MapTag of context data. Linked data (player, npc, ...) is automatically sent across to the event. Use with custom event |
Related Tags | <entry[saveName].any_ran> returns a boolean indicating whether any events ran as a result of this command.
<entry[saveName].was_cancelled> returns a boolean indicating whether the event was cancelled.
<entry[saveName].determination_list> returns a ListTag of determinations to this event. Will be an empty list if 'determine output:' is never used.
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Group | core |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/core/CustomEventCommand.java#L23 |
Name | Debug |
Related Guide Page | https://guide.denizenscript.com/guides/first-steps/problem-solving.html |
Syntax | debug [<type>] [<message>] (name:<name>) |
Short Description | Shows a debug message. |
Full Description | Use to quickly output debug information to console.
Valid types include: DEBUG: standard hideable debug. HEADER: standard hideable debug inside a header line. FOOTER: a footer line. SPACER: a spacer line. LOG: global output, non-hideable. APPROVAL: "Okay!" output, non-hideable. ERROR: "Error!" output, non-hideable. REPORT: normally used to describe the arguments of a command, requires a name, hideable. EXCEPTION: outputs a full java stacktrace. RECORD: Use message 'start' to start recording, 'submit' to submit a recording, or 'cancel' to cancel a recording. TODO: Should [<type>] be required? Perhaps default to 'debug' mode? |
Related Tags | <entry[saveName].submitted> returns the submit link (if any).
|
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/DebugCommand.java#L23 |
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>]> ERROR: TAG INVALID <server.players_flagged[<flag_name>]> ERROR: TAG INVALID <server.spawned_npcs_flagged[<flag_name>]> ERROR: TAG INVALID <server.npcs_flagged[<flag_name>]> ERROR: TAG INVALID |
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 | 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 | Note |
Related Guide Page | https://guide.denizenscript.com/guides/advanced/notables.html |
Syntax | note [<object>/remove] [as:<name>] |
Short Description | Adds or removes a named note of an object to the server. |
Full Description | Add or remove a 'note' to the server, persistently naming an object that can be referenced in events or scripts.
Only works for object types that are 'notable'. Noted objects are "permanent" versions of other ObjectTags. (See: ObjectTags) Noted objects keep their properties when added. Notable object types: CuboidTag, EllipsoidTag, PolygonTag, LocationTag, InventoryTag |
Related Tags | <server.notes[<type>]> ERROR: TAG INVALID
<CuboidTag.note_name> ERROR: TAG INVALID <EllipsoidTag.note_name> ERROR: TAG INVALID <PolygonTag.note_name> ERROR: TAG INVALID <InventoryTag.note_name> ERROR: TAG INVALID <LocationTag.note_name> ERROR: TAG INVALID |
Usage Example |
|
Usage Example |
|
Usage Example |
|
Synonyms (Search Aid) | notable |
Group | core |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/core/NoteCommand.java#L26 |
Name | Redis |
Syntax | redis [id:<ID>] [connect:<host> (auth:<secret>) (port:<port>/{6379}) (ssl:true/{false})/disconnect/subscribe:<channel>|.../unsubscribe/publish:<channel> message:<message>/command:<command> (args:<arg>|...)] |
Short Description | Interacts with a Redis server. |
Full Description | This command is used to interact with a redis server. It can run any standard redis commands as well as subscribe for pub/sub redis channel notifications.
Redis is a simple key/value data store that is typically used for caching and sending data between servers. The redis server runs in memory, meaning requests are insanely fast. If you run redis locally, you can expect responses to take under a millisecond. It is normally advised to run commands as ~waitable (see ~waitable), but because of the usual fast responses when the server is on localhost, you can also run commands without ~waiting. When running commands, make sure to escape unpredictable values such as player input. Alternatively, include the main redis command as the 'command' input and further arguments as a ListTag input for 'args'. This command supports subscribing to pub/sub redis channels. This allows you to listen to published messages to redis from any source, including other servers. When you subscribe to a channel, matching messages sent to the channel will trigger the redis pubsub message event. Connections that are subscribed to channels get tied up listening for messages and are unavailable to run redis commands. The channels you subscribe to support wildcard (*) matchers and other patterns, defined by the redis docs: https://redis.io/commands/psubscribe Note: Make sure there are at least a few ticks between opening a subscription and closing it, otherwise strange behavior will occur. You can publish messages to listening subscribers via publish:<channel> message:<message>. Note that this has to be done on a separate redis connection if it is already subscribed. Saving the result of this call returns the number of connected subscribers the message was sent to. The redis command is merely a wrapper, and further usage details should be gathered from an official redis command reference rather than from Denizen command help. You can view the official redis documentation and the supported commands here: https://redis.io/ |
Related Tags | <entry[saveName].result> returns an ElementTag or ListTag of the results of your command, depending on the redis command you ran.
<util.redis_connections> Returns a list of all Redis connections opened by redis.
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
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/RedisCommand.java#L25 |
Name | ReflectionSet |
Syntax | reflectionset [object:<object>] [field:<name>] (value:<value>) |
Short Description | Sets a field on an object to a given value, or null. |
Full Description | Give a JavaReflectedObjectTag as the object, a field name, and a value (or leave off for null) to set the value of a field on that object.
Uses reflection to set, and so can bypass 'private' or 'final' field limits if permitted by config. If the value is fed as a general ObjectTag, automatic conversion will be attempted. If automatic conversion is not possible, you must pass a JavaReflectedObjectTag with the appropriate type as the value. Requires config setting "Reflection.Allow set command". |
Related Tags | <ObjectTag.reflected_internal_object> Returns the reflected internal Java object for a given ObjectTag.
|
Usage Example |
|
Group | core |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/core/ReflectionSetCommand.java#L30 |
Name | Reload |
Syntax | reload ({scripts}/scripts_now/config/saves/notes) |
Short Description | Reloads all Denizen scripts. Primarily for use as an in-game command. |
Full Description | Reloads all Denizen scripts.
Primarily for use as an in-game command, like "/ex reload". By default, reloads scripts in a way that may delay a few ticks to avoid interrupting the server on large reloads. Optionally, specify "scripts_now" to force a locked reload (server freezes until reloaded). You can specify "config", "saves", or "notes" to reload that data instead of scripts. When using 'scripts' (default), the reload command is ~waitable. Refer to ~waitable. |
Related Tags | None
|
Usage Example |
|
Group | core |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/core/ReloadCommand.java#L25 |
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 of all row ListTags from a query or update command. That's a ListTag of ListTags, so for example to get the second entry of the first row you'd use "result_list.get[1].get[2]"
<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#L34 |
Name | Webget |
Syntax | webget [<url>] (data:<data>) (method:<method>) (headers:<map>) (timeout:<duration>/{10s}) (savefile:<path>) (hide_failure) |
Short Description | Gets the contents of a web page or API response. |
Full Description | Connects to a webpage or API and downloads its contents, to be used via the save argument and corresponding entry tags.
This should almost always be ~waited for. Refer to ~waitable. Note that while this will replace URL spaces to %20, you are responsible for any other necessary URL encoding. You may want to use the ElementTag.url_encode tag for this. Optionally, use "data:<data>" to specify a set of data to send to the server (changes the default method from GET to POST). A BinaryTag input will be used directly - any other input will be treated as a String and encoded as UTF-8. Optionally, use "method:<method>" to specify the HTTP method to use in your request. Can be: GET, POST, HEAD, OPTIONS, PUT, DELETE, TRACE, PATCH. Optionally, use "headers:" to specify a MapTag of headers. Optionally, use "savefile:" to specify a path to save the retrieved file to. This will remove the 'result' entry savedata. Path is relative to server base directory. Optionally, specify the "timeout:" to set how long the command should wait for a webpage to load before giving up. Defaults to 10 seconds. Optionally, specify 'hide_failure' to indicate that connection errors are acceptable and shouldn't display in logs. This command accepts secret inputs via SecretTag as the URL or as the value of any header. Note that you cannot mix secret with non-secret - meaning, "webget <secret[my_secret]>" and "webget https://example.com" are both valid, but "webget https://example.com/<secret[my_secret]>" is not. Similarly, for headers, each individual header value can either be a secret or not a secret. |
Related Tags | <entry[saveName].failed> returns whether the webget failed. A failure occurs when the status is not 2XX/3XX or webget failed to connect.
<entry[saveName].result> returns the text of the result of the webget. This is null only if webget failed to connect to the url.
<entry[saveName].result_binary> returns the raw binary data of the result of the webget. This is null only if webget failed to connect to the url.
<entry[saveName].result_headers> returns a MapTag of the headers returned from the webserver. Every value in the result is a list.
<entry[saveName].status> returns the HTTP status code of the webget. This is null only if webget failed to connect to the url.
<entry[saveName].time_ran> returns a DurationTag indicating how long the web connection processing took.
<ElementTag.url_encode> Encodes the element using URL encoding.
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Synonyms (Search Aid) | wget |
Group | core |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/core/WebGetCommand.java#L39 |
Name | WebServer |
Syntax | webserver [start/stop] (port:<#>) (ignore_errors) |
Short Description | Creates a local HTTP web-server within your minecraft server. |
Full Description | Creates a local HTTP web-server within your minecraft server.
The server does not provide SSL (HTTPS) security or functionality. The server does not provide active abuse-prevention or routing control or etc. If your webserver is meant for public connection, it is very strongly recommended you put the webserver behind a reverse-proxy server, such as Nginx or Apache2. The port, if unspecified, defaults to 8080. You should usually manually specify a port. The "ignore_errors" option can be enabled to silence basic connection errors that might otherwise spam your console logs. You can only exactly one webserver per port. If you use multiple ports, you can thus have multiple webservers. When using the stop instruction, you must specify the same port you used when starting. The webserver only does anything if you properly handle webserver web request Most webserver processing is done in the event, and thus is synchronous with the minecraft thread, and thus may induce lag if not done with care. Note per the event's meta, "file:" is handled async, and "cached_file:" only runs sync once per file. This command must be enabled in the Denizen/config.yml before it can be used. |
Related Tags | None
|
Usage Example |
|
Usage Example |
|
Group | core |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/core/WebServerCommand.java#L29 |
Name | FileCopy |
Syntax | filecopy [origin:<origin>] [destination:<destination>] (overwrite) |
Short Description | Copies a file from one location to another. |
Full Description | Copies a file from one location to another.
The starting directory is server/plugins/Denizen. May overwrite existing copies of files. Note that in most cases this command should be ~waited for (like "- ~filecopy ..."). Refer to ~waitable. This command can be disabled by setting Denizen config option "Commands.Filecopy.Allow copying files" to false. |
Related Tags | <entry[saveName].success> returns whether the copy succeeded (if not, either an error or occurred, or there is an existing file in the destination.)
|
Usage Example |
|
Group | file |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/file/FileCopyCommand.java#L29 |
Name | FileRead |
Syntax | fileread [path:<path>] |
Short Description | Reads the file at the given path. |
Full Description | Reads the file at the given path.
The starting directory is server/plugins/Denizen. Note that in most cases this command should be ~waited for (like "- ~fileread ..."). Refer to ~waitable. This command must be enabled by setting Denizen config option "Commands.File.Allow read" to true. |
Related Tags | <entry[saveName].data> returns a BinaryTag of the raw file content.
|
Usage Example |
|
Group | file |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/file/FileReadCommand.java#L26 |
Name | FileWrite |
Syntax | filewrite [path:<path>] [data:<binary>] |
Short Description | Writes the given raw data to the file at the given path. |
Full Description | Writes the given raw data to the file at the given path.
Will overwrite any existing file at the path. The starting directory is server/plugins/Denizen. Directories will automatically be generated as-needed. Note that in most cases this command should be ~waited for (like "- ~filewrite ..."). Refer to ~waitable. This command must be enabled by setting Denizen config option "Commands.File.Allow write" to true. |
Related Tags | None
|
Usage Example |
|
Group | file |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/file/FileWriteCommand.java#L26 |
Name | Log |
Syntax | log [<text>] (type:{info}/severe/warning/fine/finer/finest/none/clear) [file:<name>] |
Short Description | Logs some debugging info to a file. |
Full Description | This is a quick and simple way to store debugging information for admins to read.
You just input a file name and some text, and it will store that information in the file with a date/time stamp and the chosen type ('INFO' by default). If you don't want the date/time stamp and type, you can set the type to 'none' and it will only add the message text. Regardless of type, each usage of the log command will add a new line to the file, you can't just keep adding to one line. You might choose to use this to record some important things, for example, every time a player uses a dangerous command you might log the player's name and their location, so you'll know who to blame if you find something damaged. Remember that the file location is inside the server's primary folder. You most likely want to prefix file names with a folder name, For example: 'file:logs/security.log' If the file or folder path you input do not already exist, they will be automatically created. Warning: Remember that file operations are dangerous! A typo in the filename could ruin your server. It's recommended you use this command minimally. This command can be disabled by setting Denizen config option "Commands.Log.Allow logging" to false. This should almost always be ~waited for. Refer to ~waitable. |
Related Tags | None
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Synonyms (Search Aid) | textfile |
Group | file |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/file/LogCommand.java#L26 |
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 | gui |
Syntax | gui [open <script>/close] |
Short Description | Opens a GUI script into a GUI or closes a currently open one. |
Full Description | Opens the GUI script specified as a GUI, or closes a currently open one.
The GUI script must have a panel of any kind as it's element to be opened (which can contain any other elements within it). |
Related Tags | None
|
Usage Example |
|
Usage Example |
|
Group | GUI System |
Source | https://github.com/DenizenScript/Clientizen/blob/master/src/main/java/com/denizenscript/clientizen/scripts/commands/GuiCommand.java#L18 |
Name | Draw |
Syntax | draw [id:<id>] [pixel/rectangle/oval/image:<image>] (width:<width>) (height:<height>) (filled) [x:<x>] [y:<y>] (color:<color>) |
Short Description | Draws on an image. |
Full Description | Draws a pixel, shape, or image onto an image.
"id:" - the id of the image to draw on, see Image. "x:" and "y:" - the position that should be drawn on, see Image positions. For pixels or shapes: "color:" - a ColorTag of the color to draw in. For non-pixel shapes: "width:" and "height:" - the size of the shape being drawn, required. "filled" - whether the shape should be filled or just a border. optional, defaults to false. And for images: "image:" - the image to draw, required. "width:" and "height:" - the size to rescale the image being drawn to, optional. |
Related Tags | None
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Group | image |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/core/DrawCommand.java#L16 |
Name | Image |
Syntax | image [id:<id>] [load [image:<image>/path:<path>]]/[save [path:<path>] [format:<format>]]/[unload] |
Short Description | Loads, saves, and unloads images. |
Full Description | Loads, saves, and unloads images.
With "load", specify either a file path to read from or an image object to load. With "save", specify a file path to save the image to and a format to save the image in (e.g. "png", "jpg", "bmp"...), defaults to "png". For both of these the starting path is "plugins/Denizen". Use waitable syntax ("- ~image") when loading or saving from a file to avoid locking up the server during file IO, refer to ~waitable. All uses of the image command must include the "id:" argument. This is any arbitrary name, as plaintext or from a tag, to uniquely and globally identify the image object in memory. This ID can only be used by one image object at a time. IDs are stored when "load" is used, and only removed when "unload" is used. |
Related Tags | None
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Group | image |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/core/ImageCommand.java#L27 |
Name | Narrate |
Syntax | narrate [<text>] (center) |
Short Description | Prints some text into the client's chat area. |
Full Description | Prints some text into the client's chat area, optionally centering it.
When centering text, new lines will be split with each line being centered, and text wider than the chat HUD will be wrapped into multiple centered lines. |
Related Tags | None
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Group | interface |
Source | https://github.com/DenizenScript/Clientizen/blob/master/src/main/java/com/denizenscript/clientizen/scripts/commands/NarrateCommand.java#L17 |
Name | ServerEvent |
Syntax | serverevent [id:<id>] (data:<map>) |
Short Description | Sends the server an event. |
Full Description | Sends the server the client is currently connected to an event, potentially including extra data.
Input is an ID (an identifier to be used by the server to recognize the event, choose a constant name to use), and an optional MapTag of context data. Note that the server must be running Depenizen with the Clientizen Bridge enabled to receive events. |
Related Tags | None
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Group | networking |
Source | https://github.com/DenizenScript/Clientizen/blob/master/src/main/java/com/denizenscript/clientizen/scripts/commands/ServerEventCommand.java#L19 |
Name | Choose |
Syntax | choose [<option>] [<cases>] |
Short Description | Chooses an option from the list of cases. |
Full Description | Chooses an option from the list of cases.
Intended to replace a long chain of simplistic if/else if or complicated script path selection systems. Simply input the selected option, and the system will automatically jump to the most relevant case input. Cases are given as a sub-set of commands inside the current command (see Usage for samples). Optionally, specify "default" in place of a case to give a result when all other cases fail to match. Cases must be static text. They may not contain tags. For multi-tag comparison, consider the IF command. Any one case line can have multiple values in it - each possible value should be its own argument (separated by spaces). |
Related Tags | None
|
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/ChooseCommand.java#L26 |
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 | DefineMap |
Related Guide Page | https://guide.denizenscript.com/guides/basics/definitions.html |
Syntax | definemap [<name>] [<key>:<value> ...] |
Short Description | Creates a MapTag definition with key/value pairs constructed from the input arguments. |
Full Description | Creates a MapTag definition with key/value pairs constructed from the input arguments. |
Related Tags | <[<id>]> to get the value assigned to an ID
|
Usage Example |
|
Usage Example |
|
Group | queue |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/queue/DefineMapCommand.java#L26 |
Name | Determine |
Related Guide Page | https://guide.denizenscript.com/guides/first-steps/world-script.html |
Syntax | determine (passively) [<value>] |
Short Description | Sets the outcome of a script. |
Full Description | Sets the outcome of a script.
The most common use case is within script events (for example, to cancel the event). This is also required for all procedure scripts. It may be useful in other cases (such as a task script that returns a result, via the save argument). By default, the determine command will end the queue (similar to stop). If you wish to prevent this, specify the "passively" argument. To make multiple determines, simply use the determine command multiple times in a row, with the "passively" argument on each. |
Related Tags | <QueueTag.determination> Returns the values that have been determined via Determine (...)
|
Usage Example |
|
Usage Example |
|
Synonyms (Search Aid) | return |
Group | queue |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/queue/DetermineCommand.java#L23 |
Name | Else |
Related Guide Page | https://guide.denizenscript.com/guides/basics/if-command.html |
Syntax | else (if <comparison logic>) |
Short Description | Helper command for usage with the if command. |
Full Description | A helper command to use with if commands.
See if command documentation. |
Related Tags | See IF command documentation.
|
Usage Example |
|
Group | queue |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/queue/ElseCommand.java#L17 |
Name | Foreach |
Related Guide Page | https://guide.denizenscript.com/guides/basics/loops.html |
Syntax | foreach [stop/next/<object>|...] (as:<name>) (key:<name>) [<commands>] |
Short Description | Loops through a ListTag, running a set of commands for each item. |
Full Description | Loops through a ListTag of any type. For each item in the ListTag, the specified commands will be ran for that list entry.
Alternately, specify a map tag to loop over the set of key/value pairs in the map, where the key will be <[key]> and the value will be <[value]>. Specify "key:<name>" to set the key definition name (if unset, will be "key"). Specify "as:<name>" to set the value definition name (if unset, will be "value"). Use "as:__player" to change the queue's player link, or "as:__npc" to change the queue's NPC link. Note that a changed player/NPC link persists after the end of the loop. To end a foreach loop, do - foreach stop To jump immediately to the next entry in the loop, do - foreach next Note that many commands and tags in Denizen support inputting a list directly, making foreach redundant for many simpler cases. Note that if you delay the queue (such as with wait or ~waitable) inside a foreach loop, the loop can't process the next entry until the delay is over. This can lead to very long waits if you have a long list and a wait directly in the loop, as the total delay is effectively multiplied by the number of iterations. Use run if you want to run logic simultaneously for many entries in a list in a way that allows them to separately wait without delaying each other. |
Related Tags | <[value]> to get the current item in the loop
<[loop_index]> to get the current loop iteration number
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Group | queue |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/queue/ForeachCommand.java#L31 |
Name | Goto |
Syntax | goto [<name>] |
Short Description | Jump forward to a location marked by mark. |
Full Description | Jumps forward to a marked location in the script.
For example:
Most scripters should never use this. This is only for certain special cases. |
Related Tags | None
|
Usage Example |
|
Group | queue |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/queue/GotoCommand.java#L24 |
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 | Inject |
Related Guide Page | https://guide.denizenscript.com/guides/basics/run-options.html |
Syntax | inject [<script>] (path:<name>) (instantly) |
Short Description | Runs a script in the current queue. |
Full Description | Injects a script into the current queue.
This means this task will run with all of the original queue's definitions and tags. It will also now be part of the queue, so any delays or definitions used in the injected script will be accessible in the original queue. |
Related Tags | None
|
Usage Example |
|
Group | queue |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/queue/InjectCommand.java#L25 |
Name | Mark |
Syntax | mark [<name>] |
Short Description | Marks a location for goto. |
Full Description | Marks a location for the goto command. See goto for details. |
Related Tags | None
|
Usage Example |
|
Group | queue |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/queue/MarkCommand.java#L18 |
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 | Random |
Syntax | random [<commands>] |
Short Description | Selects a random choice from the following script commands. |
Full Description | The random command picks one of the following script command and skips all the other script commands that are in its section.
Commands like "repeat 1" or "if true" can be used to group together a sublisting of commands to execute together (as a way to get around the 1-command limit). If wanting to choose a random long set of commands, consider instead using choose with util.random.int.to |
Related Tags | <entry[saveName].possibilities> returns an ElementTag of the possibility count.
<entry[saveName].selected> returns an ElementTag of the selected number.
|
Usage Example |
|
Usage Example |
|
Group | queue |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/queue/RandomCommand.java#L24 |
Name | RateLimit |
Syntax | ratelimit [<object>] [<duration>] |
Short Description | Limits the rate that queues may process a script at. |
Full Description | Limits the rate that queues may process a script at.
If another queue tries to run the same script faster than the duration, that second queue will be stopped. Note that the rate limiting is tracked based on two unique factors: the object input, and the specific script line. That is to say: if you have a 'ratelimit <player> 10s', and then a few lines down a 'ratelimit <player> 10s', those are two separate rate limiters. Additionally, if you have a 'ratelimit <player> 10s' and two different players run it, they each have a separate rate limit applied. Note that this uses game delta tick time, not system realtime. |
Related Tags | None
|
Usage Example |
|
Group | queue |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/queue/RateLimitCommand.java#L24 |
Name | Repeat |
Related Guide Page | https://guide.denizenscript.com/guides/basics/loops.html |
Syntax | repeat [stop/next/<amount>] (from:<#>) (as:<name>) [<commands>] |
Short Description | Runs a series of braced commands several times. |
Full Description | Loops through a series of braced commands a specified number of times.
To get the number of loops so far, you can use <[value]>. Optionally, specify "as:<name>" to change the definition name to something other than "value". Optionally, to specify a starting index, use "from:<#>". Note that the "amount" input is how many loops will happen, not an end index. The default "from" index is "1". Note that the value you give to "from" will be the value of the first loop. To stop a repeat loop, do - repeat stop To jump immediately to the next number in the loop, do - repeat next |
Related Tags | <[value]> to get the number of loops so far
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Synonyms (Search Aid) | for |
Group | queue |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/queue/RepeatCommand.java#L28 |
Name | Run |
Related Guide Page | https://guide.denizenscript.com/guides/basics/run-options.html |
Syntax | run [<script>] (path:<name>) (def:<element>|.../defmap:<map>/def.<name>:<value>) (id:<name>) (speed:<value>/instantly) (delay:<value>) |
Short Description | Runs a script in a new queue. |
Full Description | Runs a script in a new queue.
You must specify a script object to run. Optionally, use the "path:" argument to choose a specific sub-path within a script. Optionally, use the "def:" argument to specify definition values to pass to the script, the definitions will be named via the "definitions:" script key on the script being ran, or numerically in order if that isn't specified (starting with <[1]>). 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. Alternately, use "def.<name>:<value>" to define one or more named definitions individually. Optionally, use the "speed:" argument to specify the queue command-speed to run the target script at, or use the "instantly" argument to use an instant speed (no command delay applied). If neither argument is specified, the default queue speed applies (normally instant, refer to the config file). Generally, prefer to set the "speed:" script key on the script to be ran, rather than using this argument. Optionally, use the "delay:" argument to specify a delay time before the script starts running. Optionally, specify the "id:" argument to choose a custom queue ID to be used. If none is specified, a randomly generated one will be used. Generally, don't use this argument. The run command is ~waitable. Refer to ~waitable. |
Related Tags | <entry[saveName].created_queue> returns the queue that was started by the run command.
|
Usage Example |
|
Usage Example |
|
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/RunCommand.java#L31 |
Name | RunLater |
Syntax | runlater [<script>] (path:<name>) [delay:<duration>] (id:<id>) (def:<element>|.../defmap:<map>/def.<name>:<value>) |
Short Description | Causes a task to run sometime in the future, even if the server restarts. |
Full Description | Causes a task to run sometime in the future, even if the server restarts.
Script, path, and definition inputs work the exact same as with run. This command will store intended script runs to a file, so that even if the server restarts, they will still run. Script runs are guaranteed to happen after the time is up - if the server is turned off at the scheduled time, they will run at next startup. The guarantee can be broken if the server crashes or other errors occur. The delay input is a DurationTag instance, that is relative to system time (not server delta time). Definitions and queue object links will be preserved, so long as they remain valid at time of execution. Objects that are lost before the delay is up (such as a linked NPC that is removed) may cause errors. You can optionally specify the "id" argument to provide a unique tracking ID for the intended future run, which can then also be used to cancel it via system.cancel_runlater. If you use IDs, they must be unique - you cannot have the same ID scheduled twice. Use util.runlater_ids if you need to dynamically check if an ID is in use. Implementation note: the system that tracks when scripts should be ran is a fair bit more optimized than 'wait' commands or the 'run' command with a delay, specifically for the case of very large delays (hours or more) - in the short term, 'wait' or 'run' with a delay will be better. |
Related Tags | <util.runlater_ids> Returns a list of all scheduled task IDs for runlater. (...)
|
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/RunLaterCommand.java#L36 |
Name | Stop |
Syntax | stop |
Short Description | Stops the current queue. |
Full Description | This will immediately stop the current queue, preventing it from processing any further. |
Related Tags | <queue> to get the current queue.
|
Usage Example |
|
Group | queue |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/queue/StopCommand.java#L16 |
Name | Wait |
Syntax | wait (<duration>) (queue:<name>) (system/{delta}) |
Short Description | Delays a script for a specified amount of time. |
Full Description | Pauses the script queue for the duration specified. If no duration is specified it defaults to 3 seconds.
Accepts the 'queue:<name>' argument which allows the delay of a different queue. Accepts a 'system' argument to delay based on system time (real-world time on a clock). When that argument is not used, waits based on delta time (in-game time tracking, which tends to vary by small amounts, especially when the server is lagging). Generally, do not use the 'system' argument unless you have a specific good reason you need it. |
Related Tags | <QueueTag.speed> Returns the speed of the queue as a Duration. A return of '0' implies it is 'instant'. (...)
|
Usage Example |
|
Usage Example |
|
Synonyms (Search Aid) | delay |
Group | queue |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/queue/WaitCommand.java#L22 |
Name | WaitUntil |
Syntax | waituntil (rate:<duration>) (max:<duration>) [<comparisons>] |
Short Description | Delays a script until the If comparisons return true. |
Full Description | Delays a script until the If comparisons return true. Refer to if for if command syntax information.
Optionally, specify an update rate (if unset, will update at queue speed). The update rate controls how often the tag will be checked. This generally doesn't need to be set, unless you're concerned about script efficiency. Never set this to faster than queue update rate. Optionally specify a maximum duration to wait for (delta time). |
Related Tags | <QueueTag.speed> Returns the speed of the queue as a Duration. A return of '0' implies it is 'instant'. (...)
|
Usage Example |
|
Usage Example |
|
Group | queue |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/queue/WaitUntilCommand.java#L29 |
Name | While |
Related Guide Page | https://guide.denizenscript.com/guides/basics/loops.html |
Syntax | while [stop/next/[<value>] (!)(<operator> <value>) (&&/|| ...)] [<commands>] |
Short Description | Runs a series of braced commands until the tag returns false. |
Full Description | Runs a series of braced commands until the if comparisons returns false. Refer to if for if command syntax information.
To end a while loop, use the 'stop' argument. To jump to the next entry in the loop, use the 'next' argument. |
Related Tags | <[loop_index]> to get the number of loops so far.
|
Usage Example |
|
Group | queue |
Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/queue/WhileCommand.java#L26 |
Name | Particle |
Syntax | particle [type:<particle>] [at:<location>] (velocity:<velocity>) (color:<color>) (duration:<duration>) (scale_multiplier:<#.#>) (data:<map>/raw_data:<data>) |
Short Description | Spawns a particle in the world. |
Full Description | Spawns a particle of the specified type in the world.
The type can be any particle type, including ones added by other mods - see https://minecraft.wiki/w/Particles_(Java_Edition)#Types_of_particles for all vanilla particle types. The location can be any location to play the particle at. The velocity is a vector location for the particle's movement, which overrides its default movement (if any). The color will override the particle's color or color its texture (depending on the particle), and can be any color. Alpha is supported by some particles, and will change their transparency. The duration is the amount of time the particle will exist for before disappearing. The scale multiplier is a multiplier for the particle's size, which applies on top of any scaling the particle might already have (so particles with varying sizes will still have varying sizes, for example). The data is a map of custom data for the particle (see below). Raw data is an alternative data input that takes in text in the same format as the "/particle" command and parses it into the particle's data. Should generally prefer the "data:" argument. "block", "block_marker", and "falling_dust" take: - MaterialTag "material" key, for the particle's block type. "dust" takes: - ColorTag "color" key, for the dust's color. - ElementTag(Decimal) "scale" key, for the dust's size. "dust_color_transition" takes: - ColorTag "from" key, for the color to transition from. - ColorTag "to" key, for the color to transition to. - ElementTag(Decimal) "scale" key, for the dust's size. "sculk_charge" takes: - ElementTag(Decimal) "roll" key, for the charge's angle in radians (see also ElementTag.to_radians). "item" takes: - ItemTag "item" key, for the item the particle displays. "vibration" takes: - DurationTag "arrival_time" key, for the amount of time it takes the particle to reach its destination. - And a destination, which can be either: - LocationTag "location" key, for the particle to travel to a specific location. - EntityTag "entity" key, for the particle to travel to an entity. - When specifying an entity, optionally include a ElementTag(Decimal) "y_offset" key for the particle to target a position above the entity's location. "shriek" takes: - DurationTag "delay" key, for the amount of time the particle should wait before spawning. |
Related Tags | None
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Group | world |
Source | https://github.com/DenizenScript/Clientizen/blob/master/src/main/java/com/denizenscript/clientizen/scripts/commands/ParticleCommand.java#L41 |