random out of 3939 meta-documentation entries...| 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 | <CuboidTag.random> |
| Returns | LocationTag |
| Description | Returns a random block location within the cuboid.
(Note: random selection will not be fairly weighted for multi-member cuboids). |
| Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/CuboidTag.java#L730 |
| Name | <EllipsoidTag.random> |
| Returns | LocationTag |
| Description | Returns a random decimal location within the ellipsoid.
Note that distribution of results will not be completely even. |
| Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EllipsoidTag.java#L409 |
| Name | <ListTag.random[(<#>)]> |
| Returns | ObjectTag |
| Description | Gets a random item in the list and returns it.
Optionally, add [<#>] to instead get a list of multiple randomly chosen list entries. |
| Example | |
| Example | |
| Example | |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2692 |
| Name | <LocationTag.random_offset[<limit>]> |
| Returns | LocationTag |
| Description | Returns a copy of this location, with the X/Y/Z offset by a random decimal value up to a given limit.
The limit can either be an X,Y,Z location vector like [3,1,3] or a single value like [3] (which is equivalent to [3,3,3]). For example, for a location at 0,100,0, ".random_offset[1,2,3]" can return any decimal location within the cuboid from -1,98,-3 to 1,102,3. |
| Group | math |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L1099 |
| Name | <util.random_boolean> |
| Returns | ElementTag(Boolean) |
| Description | Returns a random boolean (true or false). Essentially a coin flip. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/tags/core/UtilTagBase.java#L205 |
| Name | <util.random_chance[<percent>]> |
| Returns | ElementTag(Boolean) |
| Description | Returns a random boolean (true or false) with the given percent chance (from 0 to 100). |
| Example | |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/tags/core/UtilTagBase.java#L190 |
| Name | <util.random_decimal> |
| Returns | ElementTag(Decimal) |
| Description | Returns a random decimal number from 0 to 1. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/tags/core/UtilTagBase.java#L180 |
| Name | <util.random_gauss> |
| Returns | ElementTag(Decimal) |
| Description | Returns a random decimal number with a gaussian distribution.
70% of all results will be within the range of -1 to 1. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/tags/core/UtilTagBase.java#L215 |
| Name | <util.random_simplex[x=<#.#>;(y=<#.#>);(z=<#.#>);(w=<#.#>)]> |
| Returns | ElementTag(Decimal) |
| Description | Returns a pseudo-random decimal number from -1 to 1, based on a Simplex Noise algorithm. See https://en.wikipedia.org/wiki/Simplex_noise
Input map is like "x=1.0", or "x=1.0;y=2.0", or "x=1.0;y=2.0;z=3" or "x=1;y=2;z=3;w=4" (That is: 1d, 2d, 3d, or 4d). |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/tags/core/UtilTagBase.java#L236 |
| Name | <util.random_uuid> |
| Returns | ElementTag |
| Description | Returns a random unique ID. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/tags/core/UtilTagBase.java#L226 |
| Name | <util.random.boolean> |
| Returns | ElementTag(Boolean) |
| Description | Deprecated in favor of util.random_boolean |
| Deprecated | use 'util.random_boolean' with a '_' |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/tags/core/UtilTagBase.java#L125 |
| Name | <util.random.decimal[<#.#>].to[<#.#>]> |
| Returns | ElementTag(Decimal) |
| Description | Returns a random decimal number between the 2 specified decimal numbers, inclusive. |
| Example | |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/tags/core/UtilTagBase.java#L86 |
| Name | <util.random.decimal> |
| Returns | ElementTag(Decimal) |
| Description | Deprecated in favor of util.random_decimal |
| Deprecated | use 'util.random_decimal' with a '_' |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/tags/core/UtilTagBase.java#L113 |
| Name | <util.random.duuid[(<source>)]> |
| Returns | ElementTag |
| Description | Returns a random 'denizen' unique ID, which is made of a randomly generated sentence.
Optionally specify the source context to base the value on. There is no guarantee of format or content of the returned value - generally, use any other random tag instead of this. |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/tags/core/UtilTagBase.java#L161 |
| Name | <util.random.gauss> |
| Returns | ElementTag(Decimal) |
| Description | Deprecated in favor of util.random_gauss |
| Deprecated | use 'util.random_gauss' with a '_' |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/tags/core/UtilTagBase.java#L137 |
| Name | <util.random.int[<#>].to[<#>]> |
| Returns | ElementTag(Number) |
| Description | Returns a random integer number between the 2 specified integer numbers, inclusive. |
| Example | |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/tags/core/UtilTagBase.java#L59 |
| Name | <util.random.uuid> |
| Returns | ElementTag |
| Description | Deprecated in favor of util.random_uuid |
| Deprecated | use 'util.random_uuid' with a '_' |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/tags/core/UtilTagBase.java#L149 |
| 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 | Follow |
| Syntax | follow (followers:<entity>|...) (stop/target:<entity>) (lead:<#.#>) (max:<#.#>) (speed:<#.#>) (allow_wander) (no_teleport) |
| Short Description | Causes a list of entities to follow a target. |
| Full Description | Causes a list of entities to follow a target.
Specify the list of followers or just one. If no follower is specified, will use the linked NPC. Specify either the target to follow, or 'stop'. If no target is specified, will use the linked player. Use 'speed' to set the movement speed multiplier. Use 'lead' to set how far away the follower will remain from the target (ie, it won't try to get closer than the 'lead' distance). Use 'max' to set the maximum distance between the follower and the target before the follower will automatically start teleporting to keep up. Use 'no_teleport' to disable teleporting when the entity is out of range (instead, the entity will simply give up). Use 'allow_wander' to allow the entity to wander randomly. The 'max' and 'allow_wander' arguments can only be used on non-NPC entities. |
| Related Tags | <NPCTag.navigator.target_entity> returns the entity the npc is following.
|
| 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/FollowCommand.java#L24 |
| Name | PlaySound |
| Syntax | playsound (<location>|...) (<player>|...) [sound:<name>] (volume:<#.#>) (pitch:<#.#>) (custom) (sound_category:<category_name>) |
| Short Description | Plays a sound at the location or to a list of players. |
| Full Description | Plays a sound to a player or nearby players at a location.
The sound is played through the player's client just like any other sounds in Minecraft. For a list of all sounds, check https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html Sounds are by default played under their normal sound type (eg zombie sounds are under the type Mobs/Animals). You can optionally instead specify an alternate sound category to use. For a list of all valid sound categories, check https://hub.spigotmc.org/javadocs/spigot/org/bukkit/SoundCategory.html Specifying a player or list of players will only play the sound for each player, from their own location (but will not follow them if they move). If a location is specified, it will play the sound for any players that are near the location specified. If both players and locations are specified, will play the sound for only those players at those locations. Optionally, specify 'custom' to play a custom sound added by a resource pack, changing the sound name to something like 'random.click' Optionally specify a pitch value (defaults to 1.0). A pitch from 0.0 to 1.0 will be deeper (sounds like a demon), and above 1.0 will be higher pitched (sounds like a fairy). Optionally specify a volume value (defaults to 1.0). A volume from 0.0 to 1.0 will be quieter than normal. A volume above 1.0 however will not be louder - instead it will be audible from farther (approximately 1 extra chunk of distance per value, eg 2.0 is 2 more chunks, 5.0 is 5 more chunks, etc.). |
| Related Tags | <server.sound_types> Deprecated in favor of server.sound_keys on MC 1.21+.
|
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Synonyms (Search Aid) | noise |
| Group | world |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/world/PlaySoundCommand.java#L32 |
| 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 | TabList |
| Syntax | tablist [add/remove/update] (name:<name>) (display:<display>) (uuid:<uuid>) (skin_blob:<blob>) (latency:<#>) (gamemode:creative/survival/adventure/spectator) (listed:true/false) |
| Short Description | Modifies values in the player's tablist. |
| Full Description | Adds, removes, or updates a player profile entry in the player's tab-list view.
Using 'add' will add a new entry to the client's player list. 'name' must be specified. 'display' if unspecified will be the same as the name. 'uuid' if unspecified will be randomly generated. 'skin_blob' if unspecified will be a default Minecraft skin. Skin blob should be in format "texture;signature" (separated by semicolon). 'latency' is a number representing the players ping, if unspecified will be 0. 0 renders as full ping, -1 renders an "X", 500 renders orange (3 bars), 1000 renders red (1 bar). 'gamemode' if unspecified will be creative. 'spectator' renders as faded and is pushed below all non-spectator entries. 'listed' determines whether the entry will show up in the tab list, defaults to 'true'. Using 'remove' will remove an entry from the tab list. 'uuid' must be specified. Using 'update' will update an existing entry in the tab list. 'uuid' must be specified. Only 'display', 'latency', 'gamemode', and 'listed' can be updated. Usage of display names that are not empty requires enabling Denizen/config.yml option "Allow restricted actions". Using this tool to add entries that look like real players (but aren't) is forbidden. |
| Related Tags | None
|
| Usage Example | |
| Usage Example | |
| Group | player |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/player/TablistCommand.java#L32 |
| Name | Attribute Modifiers |
| Description | In minecraft, the "attributes" system defined certain core numerical values on entities, such as max health or attack damage.
The value of an "attribute" is determined by its "base value" modified mathematically by each of its "attribute modififers". "Attribute modifiers" can be added either directly to the entity, or onto items - when on an item, an entity can equip it into the correct slot to automatically apply the modifier. These can be read via such tags as EntityTag.attribute_modifiers, ItemTag.attribute_modifiers, EntityTag.has_attribute, EntityTag.attribute_value, EntityTag.attribute_base_value, EntityTag.attribute_default_value, ... These can be modified by such mechanisms as EntityTag.attribute_base_values, EntityTag.attribute_modifiers, EntityTag.add_attribute_modifiers, EntityTag.remove_attribute_modifiers, ItemTag.attribute_modifiers, ItemTag.add_attribute_modifiers, ItemTag.remove_attribute_modifiers, ... The input format of each of the 'add' and set mechanisms is slightly complicated: a MapTag where the keys are attribute names, and values are a ListTag of modifiers, where each modifier is itself a MapTag with required keys 'operation' and 'amount', and additionally: Before MC 1.21: optional 'name', 'slot', and 'id' keys. The default ID will be randomly generated, the default name will be the attribute name. After MC 1.21: required 'key' key, and optional 'slot'. The 'key' is the attribute's name/identifier in a "namespace:key" format (defaulting to the "minecraft" namespace), which has to be distinct to other modifiers of the same type on the object. Valid operations: ADD_NUMBER, ADD_SCALAR, and MULTIPLY_SCALAR_1 Valid slots (used up to MC 1.20.6): HAND, OFF_HAND, FEET, LEGS, CHEST, HEAD, ANY Valid slot groups (used on MC 1.20.6+): https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/EquipmentSlotGroup.html Valid attribute names are listed at https://hub.spigotmc.org/javadocs/spigot/org/bukkit/attribute/Attribute.html The default slot/slot group is "any". Operation names are based on the Bukkit enum. ADD_NUMBER corresponds to Mojang "ADDITION" - adds on top of the base value. ADD_SCALAR corresponds to Mojang "MULTIPLY_BASE" - adds to the total, multiplied by the base value. MULTIPLY_SCALAR_1 corresponds to Mojang "MULTIPLY_TOTAL", multiplies the final value (after both "add_number" and "add_scaler") by the amount given plus one. They are combined like (pseudo-code):
See also https://minecraft.wiki/w/Attribute#Modifiers For a quick and dirty in-line input, you can do for example: [generic_max_health=<list[<map[key=my_project:add_health;operation=ADD_NUMBER;amount=20;slot=HEAD]>]>] For more clean/proper input, instead do something like:
When pre-defining a custom item, instead of this, simply use an item script: item script containers. That page shows an example of valid attribute modifiers on an item script. |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityAttributeModifiers.java#L208 |
| Name | 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 | Particle Effects |
| Description | All the effects listed here can be used by PlayEffect to display visual effects or play sounds
Effects: - Everything on https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Particle.html - Everything on https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Effect.html - RANDOM (chooses a random visual effect from the Particle list) |
| Group | Useful Lists |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/world/PlayEffectCommand.java#L43 |
| Name | Unique Objects vs Generic Objects |
| Description | There are a lot of object types in the Denizen object system, and not all of them behave the same way.
It can be useful to separate object types into categories to better understand how objects work, and how Denizen as a whole works. While there are some hardlined separations, there are also some generalizations that don't necessarily hold exactly, but are still helpful. One such generalization is the separation between Unique and Generic object types. A UNIQUE object is the way you might assume all objects are. Unique objects most notably include EntityTag objects and the derivative NPCTag / PlayerTag objects. An entity object identifies in a form like 'e@<uuid>', where '<uuid>' is some unique ID that looks something like 'abc123-4d5e6f'. This ID is randomly generated by the Minecraft server and is used to identify that one entity in the world separately from any other. 'e@abc123' is not "a creeper" to the engine, it is "that specific creeper over there". An object that is unique must have some way to specify the exact single instance of it in the world, like the UUID used by entities. A GENERIC object can be said to be a 'description' of a unique object. A generic form of an EntityTag might look like 'e@creeper'. Instead of "that specific creeper over there", it is instead "the concept of a creeper mob". There is no way for the engine to read only the word 'creeper' and find out which specific creeper in the world it came from... it could be any of them, there's often hundreds of creepers spawned somewhere in the world at any time. Objects like items and materials are always generic. There is no unique identifier for any item, there is only the description. An item usually looks something like 'i@stick'. ItemTag objects can include more detail, like 'i@stick[lore=hi;display_name=My Stick;enchantments=[sharpness=5]]'... but this is still just a description, and there could still be many items out there that match this description. The consequences of this mostly relate to: - How you adjust an object (eg change the lore of an item, or teleport an entity). For example: you can't teleport the generic concept of a creeper, but you can certainly teleport a specific single creeper in the world. - How reliable tags on the object are. For example: the result of 'ItemTag.lore' on the item 'i@stick[lore=hi]' will always be 'hi' (because ItemTags are generic), but the result of 'EntityTag.location' on the entity 'e@abc123' will change every tick as the entity moves, or even become invalid if the entity dies (because that EntityTag is unique). Here's where the separation gets muddy: First, as mentioned, an EntityTag can either be unique ('e@abc123', 'n@42', etc.) OR generic ('e@creeper', 'e@zombie[custom_name=Bob]', etc). Second, some object types exhibit a bit of both. For example, a LocationTag refers to a unique block in the world (like, 'l@1,2,3,world' is always that specific block at that position), but also is a generic object in terms of the location object itself - if for example you want to change the angle of a location, you have to essentially 'create' a new location, that is an exact copy of the previous one but with a new yaw or pitch value. |
| Group | Object System |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/ObjectTag.java#L43 |
| Name | Virtual Inventories |
| Description | Virtual inventories are inventories that have no attachment to anything within the world of Minecraft.
They can be used for a wide range of purposes - from looting fallen enemies to serving as interactive menus with item 'buttons'. In Denizen, all noted inventories (saved by the Note command) are automatically converted into a virtual copy of the saved inventory. This enables you to open and edit the items inside freely, with automatic saving, as if it were a normal inventory. Noting is not the only way to create virtual inventories, however. Using 'generic' along with inventory properties will allow you to create temporary custom inventories to do with as you please. The properties that can be used like this are: size=<size> contents=<item>|... title=<title> holder=<inventory type> For example, the following task script opens a virtual inventory with 18 slots, where the second slot is a snowball, all the rest are empty, and the title is "My Awesome Inventory" with some colors in it. |
| Group | Inventory System |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/item/InventoryCommand.java#L65 |
| Name | fish_hook_lure_time |
| Object | EntityTag |
| Input | DurationTag |
| Related Tags | <EntityTag.fish_hook_lure_time> Returns the remaining time before this fish hook will lure a fish.
|
| Description | Sets the time until this fish hook is next lured. If this value and also bite_time and nibble_time are set zero, the luring value will be reset to a random amount.
if this value is set above zero, when it runs out, particles will spawn and bite_time will be set to a random amount. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EntityTag.java#L4291 |
| Name | instrument |
| Object | ItemTag |
| Input | ElementTag |
| Related Tags | <ItemTag.instrument> (Property) A goat horn's instrument, if any. (...)
|
| Description | (Property) A goat horn's instrument, if any.
Goat horns will default to playing "ponder_goat_horn" when the instrument is unset, although this is effectively random and shouldn't be relied on. Valid instruments are: admire_goat_horn, call_goat_horn, dream_goat_horn, feel_goat_horn, ponder_goat_horn, seek_goat_horn, sing_goat_horn, yearn_goat_horn. For the mechanism: provide no input to unset the instrument. |
| Example | |
| Example | |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemInstrument.java#L12 |
| Name | is_exact_teleport |
| Object | LocationTag |
| Input | ElementTag(Boolean) |
| Related Tags | <LocationTag.is_exact_teleport> Returns whether an end gateway is 'exact teleport' - if false, the destination will be randomly chosen *near* the destination.
|
| Description | Sets whether an end gateway is 'exact teleport' - if false, the destination will be randomly chosen *near* the destination. |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L5384 |
| Name | structure_block_data |
| Object | LocationTag |
| Input | MapTag |
| Related Tags | <LocationTag.structure_block_data> Returns the structure block data of the structure block at the location as a map with the following keys: (...)
|
| Description | Sets the structure block data of the structure block at the location. Input is a map with the following keys (all keys are optional):
- author: EntityTag: The Structure's author, can also input an ElementTag to set the name directly (set to "?" for most vanilla structures). - integrity: ElementTag(Decimal): The integrity of the structure (0-1). Lower integrity values will result in more blocks being removed when loading a structure. used with the seed to determine which blocks are randomly removed to mimic "decay". - metadata: ElementTag: Can only be set while in DATA mode. sets specific functions that can be applied to the structure, check the Minecraft wiki (https://minecraft.wiki/w/Structure_Block#Data) for more information. - mirror: ElementTag: How the structure is mirrored; "NONE", "LEFT_RIGHT", or "FRONT_BACK". - box_position: LocationTag: The position of the structure's bounding box, relative to the position of the structure block. Maximum allowed distance is 48 blocks in any direction. - rotation: ElementTag: The rotation of the structure; "NONE", "CLOCKWISE_90", "CLOCKWISE_180", or "COUNTERCLOCKWISE_90". - seed: ElementTag(Number): The seed used to determine how many blocks are removed upon loading of this structure (see "integrity" for more information). - structure_name: ElementTag: The name of the structure. - size: LocationTag: The size of the structure's bounding box, The maximum structure size is 48,48,48. - mode: ElementTag: The structure block's mode; "CORNER", "DATA", "LOAD", or "SAVE". See also MaterialTag.mode. - box_visible: ElementTag(Boolean): Whether the structure's bounding box is visible, only applies in LOAD mode. - ignore_entities: ElementTag(Boolean): Whether entities in the structure are ignored, only applies in SAVE mode. - show_invisible: ElementTag(Boolean): Whether invisible blocks in the structure are shown. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L5553 |
| Name | vanilla_tick |
| Object | LocationTag |
| Input | None |
| Description | Causes an immediate vanilla tick at a block location (normally processed at random according to the randomTickSpeed gamerule). |
| Generated Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L5425 |
| Name | ColorTag |
| Prefix | co@ |
| Base Type | ElementTag |
| Identity Format | The identity format for colors is <red>,<green>,<blue> or <red>,<green>,<blue>,<alpha> or the name of a color.
When using the numeric form, the number must be between 0 and 255, where 0 is least bright and 255 is most bright. For example, 'co@50,64,128' or 'co@255,0,0,128' or 'co@red'. |
| Description | A ColorTag represents an RGBA color code.
Note that a ColorTag is NOT a base dye color (used by wool, etc). That is handled by a separate naming system. Constructing a ColorTag also accepts 'random' to pick a random RGB color, or 'transparent' to return 0,0,0,0 or RGB hex code like '#FF00FF', or RGBA hex codes like '#FF00FF80', or valid minecraft chat color codes (hex or historical codes). A list of accepted color names can be found at util.color_names. Red/green/blue/alpha values are each from 0 to 255. |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ColorTag.java#L20 |
| Name | DurationTag |
| Prefix | d@ |
| Base Type | ElementTag |
| Identity Format | The identity format for DurationTags is the number of seconds, followed by an 's'. |
| Description | Durations are a unified and convenient way to get a 'unit of time' throughout Denizen.
Many commands and features that require a duration can be satisfied by specifying a number and unit of time, especially command arguments that are prefixed 'duration:', etc. The unit of time can be specified by using one of the following: t=ticks (0.05 seconds), s=seconds, m=minutes (60 seconds), h=hours (60 minutes), d=days (24 hours), w=weeks (7 days), y=years (365 days). Not using a unit will imply seconds. Examples: 10s, 50m, 1d, 20. Specifying a range of duration will result in a randomly selected duration that is in between the range specified. The smaller value should be first. Examples: '10s-25s', '1m-2m'. The input of 'instant' or 'infinite' will be interpreted as 0 (for use with commands where instant/infinite logic applies). |
| Source | https://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/DurationTag.java#L19 |
| Name | <ItemTag.instrument> |
| Returns | ElementTag |
| Mechanism | ItemTag.instrument |
| Description | (Property) A goat horn's instrument, if any.
Goat horns will default to playing "ponder_goat_horn" when the instrument is unset, although this is effectively random and shouldn't be relied on. Valid instruments are: admire_goat_horn, call_goat_horn, dream_goat_horn, feel_goat_horn, ponder_goat_horn, seek_goat_horn, sing_goat_horn, yearn_goat_horn. For the mechanism: provide no input to unset the instrument. |
| Example | |
| Example | |
| Group | Properties |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemInstrument.java#L12 |
| Name | <LocationTag.drops[(<item>)]> |
| Returns | ListTag(ItemTag) |
| Description | Returns what items the block at the location would drop if broken naturally.
Optionally specifier a breaker item. Not guaranteed to contain exactly correct or contain all possible drops (for things like plants that drop only when grown, ores that drop random amounts, etc). |
| Generated Example | |
| Group | world |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L1443 |
| Name | <LocationTag.is_exact_teleport> |
| Returns | ElementTag(Boolean) |
| Mechanism | LocationTag.is_exact_teleport |
| Description | Returns whether an end gateway is 'exact teleport' - if false, the destination will be randomly chosen *near* the destination. |
| Generated Example | |
| Group | world |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L4059 |
| Name | <LocationTag.simplex_3d> |
| Returns | ElementTag(Decimal) |
| Description | Returns the 3D simplex noise value (from -1 to 1) for this location's X/Y/Z.
See also util.random_simplex |
| Generated Example | |
| Group | math |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L1087 |
| Name | <LocationTag.structure_block_data> |
| Returns | MapTag |
| Mechanism | LocationTag.structure_block_data |
| Description | Returns the structure block data of the structure block at the location as a map with the following keys:
- author: ElementTag: The name of the structure's creator. set to "?" for most vanilla structures. - integrity: ElementTag(Decimal): The integrity of the structure (0-1). Lower integrity values will result in more blocks being removed when loading a structure. used with the seed to determine which blocks are randomly removed to mimic "decay". - metadata: ElementTag: Only applies in DATA mode, sets specific functions that can be applied to the structure, check the Minecraft wiki (https://minecraft.wiki/w/Structure_Block#Data) for more information. - mirror: ElementTag: How the structure is mirrored; "NONE", "LEFT_RIGHT", or "FRONT_BACK". - box_position: LocationTag: The position of the structure's bounding box, relative to the position of the structure block. Maximum allowed distance is 48 blocks in any direction. - rotation: ElementTag: The rotation of the structure; "NONE", "CLOCKWISE_90", "CLOCKWISE_180", or "COUNTERCLOCKWISE_90". - seed: ElementTag(Number): The seed used to determine how many blocks are removed upon loading of this structure (see "integrity" for more information). - structure_name: ElementTag: The name of the structure. - size: LocationTag: The size of the structure's bounding box, The maximum structure size is 48,48,48. - mode: ElementTag: The structure block's mode; "CORNER", "DATA", "LOAD", or "SAVE". See also MaterialTag.mode. - box_visible: ElementTag(Boolean): Whether the structure's bounding box is visible, only applies in LOAD mode. - ignore_entities: ElementTag(Boolean): Whether entities in the structure are ignored, only applies in SAVE mode. - show_invisible: ElementTag(Boolean): Whether invisible blocks in the structure are shown. |
| Generated Example | |
| Group | world |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L4202 |
| Name | <LocationTag.xp_drop[(<item>)]> |
| Returns | ElementTag(Number) |
| Description | Returns how much experience, if any, the block at the location would drop if broken naturally.
Returns 0 if a block wouldn't drop xp. Optionally specifier a breaker item. Not guaranteed to contain exactly the amount that actual drops if then broken later, as the value is usually randomized. |
| Generated Example | |
| Group | world |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L1464 |
| Name | attach |
| Syntax | attach [<entity>|...] [to:<entity>/cancel] (offset:<offset>) (relative) (yaw_offset:<#.#>) (pitch_offset:<#.#>) (sync_server) (no_rotate/no_pitch) (for:<player>|...) |
| Short Description | Attaches a list of entities to another entity, for client-visible motion sync. |
| Full Description | Attaches a list of entities to another entity, for client-visible motion sync.
You must specify the entity or list of entities to be attached. You must specify the entity that they will be attached to, or 'cancel' to end attachment. Optionally, specify an offset location vector to be a positional offset. This can include a yaw/pitch to offset those as well. Note that setting an offset of 0,0,0 will produce slightly different visual results from not setting any offset. Optionally, specify 'relative' to indicate that the offset vector should rotate with the target entity. If relative is used, optionally specify yaw_offset and/or pitch_offset to add an offset to rotation of the target entity when calculating the attachment offset. Optionally, specify 'for' with a player or list of players to only sync motion for those players. If unspecified, will sync for everyone. Optionally, specify 'sync_server' to keep the serverside position of the attached entities near the target entity. This can reduce some visual artifacts (such as entity unloading at distance), but may produce unintended functional artifacts. Note that you should generally only use 'sync_server' when you exclude the 'for' argument. Optionally specify 'no_rotate' to retain the attached entity's own rotation and ignore the target rotation. Optionally instead specify 'no_pitch' to retain the attached entity's own pitch, but use the target yaw. Note that attaches involving a player will not be properly visible to that player, but will still be visible to *other* players. It may be ideal to change setting "Packets.Auto init" in the Denizen config to "true" to guarantee this command functions as expected. |
| Related Tags | <EntityTag.attached_entities[(<player>)]> Returns the entities attached to this entity by attach. (...)
<EntityTag.attached_to[(<player>)]> Returns the entity that this entity was attached to by attach. (...)
<EntityTag.attached_offset[(<player>)]> Returns the offset of an attachment for this entity to another that was attached by attach. (...)
|
| Usage Example | |
| Group | entity |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/AttachCommand.java#L26 |
| Name | Attack |
| Syntax | attack [<entity>|...] (target:<entity>/cancel) |
| Short Description | Makes an entity, or list of entities, attack a target. |
| Full Description | The attack command causes a mob entity to attack a target mob entity or player.
This technically can be used on an NPC, but it will trigger the Citizens internal punching-pathfinder. This attack mode doesn't work well. If you want NPC combat, consider using Sentinel instead: https://github.com/mcmonkeyprojects/Sentinel/blob/master/README.md. To cancel an attack, use the 'cancel' argument instead of specifying a target. |
| Related Tags | <NPCTag.is_fighting> Returns whether the NPC is currently targeting an entity for the Citizens internal punching pathfinder. (...)
<NPCTag.attack_strategy> Returns the NPC's current navigator attack strategy. (...)
<NPCTag.target_entity> Returns the entity being targeted by the NPC's current navigation (if any).
|
| 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/AttackCommand.java#L26 |
| Name | Drop |
| Syntax | drop [<entity_type>/xp/<item>|...] (<location>) (quantity:<#>) (speed:<#.#>) (delay:<duration>) |
| Short Description | Drops an item, entity, or experience orb on a location. |
| Full Description | To drop an item, just specify a valid item object. To drop an entity, specify a generic entity object.
Drop can also reward players with experience orbs by using the 'xp' argument. For all three usages, you can optionally specify an integer with 'quantity:' prefix to drop multiple items/entities/xp. For items, you can add 'speed:' to modify the launch velocity. You can also add 'delay:' to set the pickup delay of the item. |
| Related Tags | <entry[saveName].dropped_entities> returns a list of entities that were dropped.
<entry[saveName].dropped_entity> returns a single entity that was dropped (if only one).
<EntityTag.item> (Property) An entity's item, which can be: (...)
<EntityTag.experience> Returns the experience value of this experience orb entity.
|
| 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/DropCommand.java#L34 |
| Name | Firework |
| Syntax | firework (<location>) (power:<#>) (<type>/random) (primary:<color>|...) (fade:<color>|...) (flicker) (trail) (life:<duration>) |
| Short Description | Launches a firework with customizable style. |
| Full Description | This command launches a firework from the specified location.
If no location is given, the linked NPC or player's location will be used by default. The power option, which defaults to 1 if left empty, specifies the 'power' integer of the firework, which mainly controls how high the firework will go before exploding. Alternately, the "life" option allows you to manually specify a specific duration. The type option which specifies the shape the firework will explode with. If unspecified, 'ball' will be used. Can be any of: ball, ball_large, star, burst, or creeper The primary option specifies what color the firework explosion will start with, as a ColorTag. If unspecified, 'yellow' will be used. The fade option specifies what color the firework explosion will fade into, as a ColorTag. The trail option means the firework will leave a trail behind it. The flicker option means the firework will explode with a flicker effect. |
| Related Tags | <EntityTag.firework_item> If the entity is a firework, returns the firework item used to launch it.
<ItemTag.is_firework> Returns whether the item is a firework. (...)
<ItemTag.firework> Returns the firework's property value as a list, matching the non-MapTag format of the mechanism. (...)
<entry[saveName].launched_firework> returns a EntityTag of the firework that was launched.
|
| 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/FireworkCommand.java#L38 |
| Name | Narrate |
| Syntax | narrate [<text>] (targets:<player>|...) (format:<script>) (per_player) (from:<uuid>) |
| Short Description | Shows some text to the player. |
| Full Description | Prints some text into the target's chat area. If no target is specified it will default to the attached player or the console.
You can format the text with Format Script Containers using the 'format' argument, or with the "narrate" format type (see Script Formats). Optionally use 'per_player' with a list of player targets, to have the tags in the text input be reparsed for each and every player. So, for example, "- narrate 'hello <player.name>' targets:<server.online_players>" would normally say "hello bob" to every player (every player sees the exact same name in the text, ie bob sees "hello bob", steve also sees "hello bob", etc) but if you use "per_player", each player online would see their own name (so bob sees "hello bob", steve sees "hello steve", etc). Optionally, specify 'from:<uuid>' to indicate that message came from a specific UUID (used for things like the vanilla client social interaction block option). |
| Related Tags | None
|
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Group | player |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/player/NarrateCommand.java#L42 |
| 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 | 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 |