Denizen Script Meta Documentation Search


Learn about how Denizen works in The Beginner's Guide.
Showing 49 search results for random out of 3939 meta-documentation entries...

Perfect Name Match Results



Command


NameRandom
Syntaxrandom [<commands>]
Short DescriptionSelects a random choice from the following script commands.
Full DescriptionThe 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 Command:choose with Tag: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
# Use to choose randomly from a braced set of commands
- random:
  - narrate "hi"
  - narrate "hello"
  - narrate "hey"
Usage Example
# Use to perform multiple commands randomly
- random:
  - repeat 1:
    - narrate "Hello"
    - narrate "How are you?"
  - repeat 1:
    - narrate "Hey"
    - narrate "It is a nice day."
Groupqueue
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/queue/RandomCommand.java#L24

Partial Name Match Results



Tag


Name<CuboidTag.random>
ReturnsLocationTag
DescriptionReturns a random block location within the cuboid.
(Note: random selection will not be fairly weighted for multi-member cuboids).
Example
# Spawns a debugblock at a random block in the cuboid "my_cuboid".
- debugblock <cuboid[my_cuboid].random>
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/CuboidTag.java#L730
Name<EllipsoidTag.random>
ReturnsLocationTag
DescriptionReturns a random decimal location within the ellipsoid.
Note that distribution of results will not be completely even.
Example
# Displays a debugblock at a random location within the ellipsoid "my_ellipsoid".
- debugblock <ellipsoid[my_ellipsoid].random>
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EllipsoidTag.java#L409
Name<ListTag.random[(<#>)]>
ReturnsObjectTag
DescriptionGets a random item in the list and returns it.
Optionally, add [<#>] to instead get a list of multiple randomly chosen list entries.
Example
# Narrates EITHER "one" OR "two" - different each time!
- narrate "<list[one|two].random>
Example
# Could narrate "one|two", "two|three", OR "one|three" - different each time!
- narrate "<list[one|two|three].random[2]>
Example
# Could narrate "one|two|three", "one|three|two", "two|one|three", "two|three|one", "three|two|one", OR "three|one|two" - different each time!
- narrate "<list[one|two|three].random[9999]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2692
Name<LocationTag.random_offset[<limit>]>
ReturnsLocationTag
DescriptionReturns 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.
Groupmath
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L1099
Name<util.random_boolean>
ReturnsElementTag(Boolean)
DescriptionReturns a random boolean (true or false). Essentially a coin flip.
Generated Example
- if <util.random_boolean>:
    - narrate "it was true!"
- else:
    - narrate "it was false!"
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/tags/core/UtilTagBase.java#L205
Name<util.random_chance[<percent>]>
ReturnsElementTag(Boolean)
DescriptionReturns a random boolean (true or false) with the given percent chance (from 0 to 100).
Example
- if <util.random_chance[25]>:
    - narrate "This happens 25% of the time"
- else:
    - narrate "This happens 75% of the time"
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/tags/core/UtilTagBase.java#L190
Name<util.random_decimal>
ReturnsElementTag(Decimal)
DescriptionReturns a random decimal number from 0 to 1.
Generated Example
- narrate "the decimal value is <util.random_decimal>"
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/tags/core/UtilTagBase.java#L180
Name<util.random_gauss>
ReturnsElementTag(Decimal)
DescriptionReturns a random decimal number with a gaussian distribution.
70% of all results will be within the range of -1 to 1.
Generated Example
- narrate "the decimal value is <util.random_gauss>"
Sourcehttps://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=<#.#>)]>
ReturnsElementTag(Decimal)
DescriptionReturns 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
- narrate "the decimal value is <util.random_simplex>"
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/tags/core/UtilTagBase.java#L236
Name<util.random_uuid>
ReturnsElementTag
DescriptionReturns a random unique ID.
Generated Example
- narrate <util.random_uuid>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/tags/core/UtilTagBase.java#L226
Name<util.random.boolean>
ReturnsElementTag(Boolean)
DescriptionDeprecated in favor of Tag:util.random_boolean
Deprecateduse 'util.random_boolean' with a '_'
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/tags/core/UtilTagBase.java#L125
Name<util.random.decimal[<#.#>].to[<#.#>]>
ReturnsElementTag(Decimal)
DescriptionReturns a random decimal number between the 2 specified decimal numbers, inclusive.
Example
# Will narrate '1.5', or '1.75', or '1.01230123', or any other decimal in range.
- narrate <util.random.decimal[1].to[2]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/tags/core/UtilTagBase.java#L86
Name<util.random.decimal>
ReturnsElementTag(Decimal)
DescriptionDeprecated in favor of Tag:util.random_decimal
Deprecateduse 'util.random_decimal' with a '_'
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/tags/core/UtilTagBase.java#L113
Name<util.random.duuid[(<source>)]>
ReturnsElementTag
DescriptionReturns 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.
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/tags/core/UtilTagBase.java#L161
Name<util.random.gauss>
ReturnsElementTag(Decimal)
DescriptionDeprecated in favor of Tag:util.random_gauss
Deprecateduse 'util.random_gauss' with a '_'
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/tags/core/UtilTagBase.java#L137
Name<util.random.int[<#>].to[<#>]>
ReturnsElementTag(Number)
DescriptionReturns a random integer number between the 2 specified integer numbers, inclusive.
Example
# Will narrate '1', '2', or '3'
- narrate <util.random.int[1].to[3]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/tags/core/UtilTagBase.java#L59
Name<util.random.uuid>
ReturnsElementTag
DescriptionDeprecated in favor of Tag:util.random_uuid
Deprecateduse 'util.random_uuid' with a '_'
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/tags/core/UtilTagBase.java#L149

Semi-Decent Match Results



Command


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

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

Requires an ID.

Progress must be between 0 and 1.

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

The UUID can optionally be specified, and will be sent to the client. Be careful to not overlap multiple bars with the same UUID.
If not specified, it will be random.
Related Tags<server.current_bossbars> Returns a list of all currently active boss bar IDs from Command:bossbar.
<server.bossbar_viewers[<bossbar_id>]> Returns a list of players that should be able to see the given bossbar ID from Command:bossbar.
<PlayerTag.bossbar_ids> Returns a list of all bossbars from Command:bossbar that this player can see. (...)
<entry[saveName].bar_uuid> returns the bossbar's UUID.
Usage Example
# Shows a message to all online players.
- bossbar MyMessageID players:<server.online_players> "title:HI GUYS" color:red
Usage Example
# Update the boss bar's color and progress.
- bossbar update MyMessageID color:blue progress:0.2
Usage Example
# Add more players to the boss bar.
- bossbar update MyMessageID players:<server.flag[new_players]>
Usage Example
# Remove a player from the boss bar.
- bossbar remove MyMessageID players:<[player]>
Usage Example
# Delete the boss bar.
- bossbar remove MyMessageID
Groupserver
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/server/BossBarCommand.java#L34
NameFollow
Syntaxfollow (followers:<entity>|...) (stop/target:<entity>) (lead:<#.#>) (max:<#.#>) (speed:<#.#>) (allow_wander) (no_teleport)
Short DescriptionCauses a list of entities to follow a target.
Full DescriptionCauses 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
# To make an NPC follow the player in an interact script.
- follow
Usage Example
# To make an NPC stop following.
- follow stop
Usage Example
# To explicitly make an NPC follow the player.
- follow followers:<npc> target:<player>
Usage Example
# To make an NPC follow the player, slowly and at distance.
- follow speed:0.7 lead:10
Groupentity
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/FollowCommand.java#L24
NamePlaySound
Syntaxplaysound (<location>|...) (<player>|...) [sound:<name>] (volume:<#.#>) (pitch:<#.#>) (custom) (sound_category:<category_name>)
Short DescriptionPlays a sound at the location or to a list of players.
Full DescriptionPlays 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 Tag:server.sound_keys on MC 1.21+.
Usage Example
# Use to play a sound for a player
- playsound <player> sound:ENTITY_EXPERIENCE_ORB_PICKUP pitch:1
Usage Example
# Use to play a sound at a location for all nearby
- playsound <player.location> sound:ENTITY_PLAYER_LEVELUP
Usage Example
# Use to notify all players with a sound
- playsound <server.online_players> sound:ENTITY_PLAYER_LEVELUP volume:0.5 pitch:0.8
Synonyms (Search Aid)noise
Groupworld
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/world/PlaySoundCommand.java#L32
NameRun
Related Guide Pagehttps://guide.denizenscript.com/guides/basics/run-options.html
Syntaxrun [<script>] (path:<name>) (def:<element>|.../defmap:<map>/def.<name>:<value>) (id:<name>) (speed:<value>/instantly) (delay:<value>)
Short DescriptionRuns a script in a new queue.
Full DescriptionRuns 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 Language:~waitable.
Related Tags<entry[saveName].created_queue> returns the queue that was started by the run command.
Usage Example
# Use to run a task script named 'MyTask'.
- run MyTask
Usage Example
# Use to run a task script named 'MyTask' that isn't normally instant, instantly.
- run MyTask instantly
Usage Example
# Use to run a local subscript named 'alt_path'.
- run <script> path:alt_path
Usage Example
# Use to run 'MyTask' and pass 3 definitions to it.
- run MyTask def:A|Second_Def|Taco
Usage Example
# Use to run 'MyTask' and pass 3 named definitions to it.
- run MyTask def.count:5 def.type:Taco def.smell:Tasty
Usage Example
# Use to run 'MyTask' and pass a list as a single definition.
- run MyTask def:<list_single[<list[a|big|list|here]>]>
# MyTask can then get the list back by doing:
- define mylist <[1]>
Groupqueue
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/queue/RunCommand.java#L31
NameTabList
Syntaxtablist [add/remove/update] (name:<name>) (display:<display>) (uuid:<uuid>) (skin_blob:<blob>) (latency:<#>) (gamemode:creative/survival/adventure/spectator) (listed:true/false)
Short DescriptionModifies values in the player's tablist.
Full DescriptionAdds, 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 TagsNone
Usage Example
# Use to add a new empty entry to the player's tab list to fill space.
- tablist add name:<empty> display:<empty> gamemode:spectator
Usage Example
# Use to update an existing entry
- tablist update uuid:<[uuid]> gamemode:spectator latency:200
Groupplayer
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/player/TablistCommand.java#L32

Language


NameAttribute Modifiers
DescriptionIn 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 Tag:EntityTag.attribute_modifiers, Tag:ItemTag.attribute_modifiers,
Tag:EntityTag.has_attribute, Tag:EntityTag.attribute_value, Tag:EntityTag.attribute_base_value, Tag:EntityTag.attribute_default_value, ...

These can be modified by such mechanisms as Mechanism:EntityTag.attribute_base_values, Mechanism:EntityTag.attribute_modifiers, Mechanism:EntityTag.add_attribute_modifiers,
Mechanism:EntityTag.remove_attribute_modifiers, Mechanism:ItemTag.attribute_modifiers, Mechanism:ItemTag.add_attribute_modifiers, Mechanism: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):

- define x <[base_value]>
- foreach <all_modifiers[ADD_NUMBER]>:
    - define x:+:<[value]>
- define y <[x]>
- foreach <all_modifiers[ADD_SCALAR]>:
    - define y:+:<[x].mul[<[value]>]>
- foreach <all_modifiers[MULTIPLY_SCALAR_1]>:
    - define y:*:<[value].add[1]>
- determine <[y]>


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:

- definemap attributes:
    generic_max_health:
        1:
            key: my_project:add_health
            operation: ADD_NUMBER
            amount: 20
            slot: head
- inventory adjust slot:head add_attribute_modifiers:<[attributes]>


When pre-defining a custom item, instead of this, simply use an item script: Language:item script containers. That page shows an example of valid attribute modifiers on an item script.
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityAttributeModifiers.java#L208
NameItem Script Containers
DescriptionItem script containers are an easy way to pre-define custom items for use within scripts. Item
scripts work with the ItemTag object, and can be fetched with the Object Fetcher by using the
ItemTag constructor ItemTag_script_name. Example: - drop <player.location> super_dooper_diamond

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


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

    type: item

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Usage Examples

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

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

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

Conditions:
- denizencondition{tag=<context.entity.location.find_players_within[30].is_empty.not>}
GroupDepenizen Bridges
RequiresDepenizen, MythicMobs
Sourcehttps://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/utilities/mythicmobs/MythicMobsLoaders.java#L20
NameParticle Effects
DescriptionAll the effects listed here can be used by Command: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)
GroupUseful Lists
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/world/PlayEffectCommand.java#L43
NameUnique Objects vs Generic Objects
DescriptionThere 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.
GroupObject System
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/ObjectTag.java#L43
NameVirtual Inventories
DescriptionVirtual 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.

open random inventory:
  type: task
  script:
  - inventory open "d:generic[size=18;title=<red>My <green>Awesome <blue>Inventory;contents=air|snowball]"
GroupInventory System
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/item/InventoryCommand.java#L65

Mechanism


Namefish_hook_lure_time
ObjectEntityTag
InputDurationTag
Related Tags<EntityTag.fish_hook_lure_time> Returns the remaining time before this fish hook will lure a fish.
DescriptionSets 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
- adjust <player> fish_hook_lure_time:5m
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EntityTag.java#L4291
Nameinstrument
ObjectItemTag
InputElementTag
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
# This can narrate: "This horn has the ponder_goat_horn instrument!"
- narrate "This horn has the <player.item_in_hand.instrument> instrument!"
Example
# Forces the player's held item to play seek_goat_horn instead of whatever it played before.
# Would break if the player isn't holding a goat horn.
- inventory adjust slot:hand instrument:seek_goat_horn
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemInstrument.java#L12
Nameis_exact_teleport
ObjectLocationTag
InputElementTag(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.
DescriptionSets whether an end gateway is 'exact teleport' - if false, the destination will be randomly chosen *near* the destination.
Generated Example
- adjust <player.location> is_exact_teleport:true
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L5384
Namestructure_block_data
ObjectLocationTag
InputMapTag
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: (...)
DescriptionSets 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 Mechanism: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.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L5553
Namevanilla_tick
ObjectLocationTag
InputNone
DescriptionCauses an immediate vanilla tick at a block location (normally processed at random according to the randomTickSpeed gamerule).
Generated Example
- adjust <player.location> vanilla_tick
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L5425

ObjectType


NameColorTag
Prefixco@
Base TypeElementTag
Identity FormatThe 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'.
DescriptionA 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 Tag:util.color_names.

Red/green/blue/alpha values are each from 0 to 255.
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ColorTag.java#L20
NameDurationTag
Prefixd@
Base TypeElementTag
Identity FormatThe identity format for DurationTags is the number of seconds, followed by an 's'.
DescriptionDurations 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).
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/DurationTag.java#L19

Tag


Name<ItemTag.instrument>
ReturnsElementTag
MechanismItemTag.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
# This can narrate: "This horn has the ponder_goat_horn instrument!"
- narrate "This horn has the <player.item_in_hand.instrument> instrument!"
Example
# Forces the player's held item to play seek_goat_horn instead of whatever it played before.
# Would break if the player isn't holding a goat horn.
- inventory adjust slot:hand instrument:seek_goat_horn
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemInstrument.java#L12
Name<LocationTag.drops[(<item>)]>
ReturnsListTag(ItemTag)
DescriptionReturns 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
- foreach <player.location.drops> as:entry:
    - narrate "found <[entry]>"
Groupworld
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L1443
Name<LocationTag.is_exact_teleport>
ReturnsElementTag(Boolean)
MechanismLocationTag.is_exact_teleport
DescriptionReturns whether an end gateway is 'exact teleport' - if false, the destination will be randomly chosen *near* the destination.
Generated Example
- if <player.location.is_exact_teleport>:
    - narrate "it was true!"
- else:
    - narrate "it was false!"
Groupworld
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L4059
Name<LocationTag.simplex_3d>
ReturnsElementTag(Decimal)
DescriptionReturns the 3D simplex noise value (from -1 to 1) for this location's X/Y/Z.
See also Tag:util.random_simplex
Generated Example
- narrate "the decimal value is <player.location.simplex_3d>"
Groupmath
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L1087
Name<LocationTag.structure_block_data>
ReturnsMapTag
MechanismLocationTag.structure_block_data
DescriptionReturns 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 Mechanism: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
- foreach <player.location.structure_block_data> key:key as:val:
    - narrate "<[key]> is set as <[val]>"
Groupworld
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L4202
Name<LocationTag.xp_drop[(<item>)]>
ReturnsElementTag(Number)
DescriptionReturns 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
- narrate "the number value is <player.location.xp_drop>"
Groupworld
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L1464

Just Barely Matched Results



Command


Nameattach
Syntaxattach [<entity>|...] [to:<entity>/cancel] (offset:<offset>) (relative) (yaw_offset:<#.#>) (pitch_offset:<#.#>) (sync_server) (no_rotate/no_pitch) (for:<player>|...)
Short DescriptionAttaches a list of entities to another entity, for client-visible motion sync.
Full DescriptionAttaches 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 Command:attach. (...)
<EntityTag.attached_to[(<player>)]> Returns the entity that this entity was attached to by Command:attach. (...)
<EntityTag.attached_offset[(<player>)]> Returns the offset of an attachment for this entity to another that was attached by Command:attach. (...)
Usage Example
# Use to attach random NPC to the air 3 blocks above a linked NPC.
- attach <server.list_npcs.random> to:<npc> offset:0,3,0
Groupentity
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/AttachCommand.java#L26
NameAttack
Syntaxattack [<entity>|...] (target:<entity>/cancel)
Short DescriptionMakes an entity, or list of entities, attack a target.
Full DescriptionThe 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
# Use to make the player's target entity attack a nearby entity.
- attack <player.target> target:<npc.location.find.living_entities.within[10].random>
Usage Example
# Use to make a random nearby entity attack a player.
- attack <player.location.find.living_entities.within[10].random> target:<player>
Usage Example
# Use to stop an entity from attacking.
- attack <[entity]> cancel
Groupentity
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/AttackCommand.java#L26
NameDrop
Syntaxdrop [<entity_type>/xp/<item>|...] (<location>) (quantity:<#>) (speed:<#.#>) (delay:<duration>)
Short DescriptionDrops an item, entity, or experience orb on a location.
Full DescriptionTo 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
# Use to drop some loot around the player.
- drop gold_nugget <cuboid[<player.location.add[-2,-2,-2]>|<player.location.add[2,2,2]>].spawnable_blocks.random>
Usage Example
# Use to reward a player with 500 xp.
- drop xp quantity:500 <player.location>
Usage Example
# Use to drop a nasty surprise (exploding TNT).
- drop primed_tnt <player.location>
Usage Example
# Use to drop an item with a pickup delay at the player's location.
- drop diamond_sword <player.location> delay:20s
Groupworld
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/world/DropCommand.java#L34
NameFirework
Syntaxfirework (<location>) (power:<#>) (<type>/random) (primary:<color>|...) (fade:<color>|...) (flicker) (trail) (life:<duration>)
Short DescriptionLaunches a firework with customizable style.
Full DescriptionThis 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
# Use to launch a star firework which explodes yellow and fades to white afterwards at the player's location.
- firework <player.location> star primary:yellow fade:white
Usage Example
# Use to make the firework launch double the height before exploding.
- firework <player.location> power:2 star primary:yellow fade:white
Usage Example
# Use to launch a firework which leaves a trail.
- firework <player.location> random trail
Usage Example
# Use to launch a firework which leaves a trail and explodes with a flicker effect at related location.
- firework <context.location> random trail flicker
Groupworld
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/world/FireworkCommand.java#L38
NameNarrate
Syntaxnarrate [<text>] (targets:<player>|...) (format:<script>) (per_player) (from:<uuid>)
Short DescriptionShows some text to the player.
Full DescriptionPrints 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 Language:Format Script Containers using the 'format' argument, or with the "narrate" format type (see Language: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 TagsNone
Usage Example
# Use to narrate text to the player.
- narrate "Hello World!"
Usage Example
# Use to narrate text to a list of players.
- narrate "Hello there." targets:<[player]>|<[someplayer]>|<[thatplayer]>
Usage Example
# Use to narrate text to a unique message to every player on the server.
- narrate "Hello <player.name>, your secret code is <util.random.duuid>." targets:<server.online_players> per_player
Groupplayer
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/player/NarrateCommand.java#L42
NameTeleport
Syntaxteleport (<entity>|...) [<location>] (cause:<cause>) (entity_options:<option>|...) (relative) (relative_axes:<axis>|...) (offthread_repeat:<#>) (offthread_yaw) (offthread_pitch)
Short DescriptionTeleports the entity(s) to a new location.
Full DescriptionTeleports the entity or entities to the new location.
Entities can be teleported between worlds using this command.
You may optionally specify a teleport cause for player entities, allowing proper teleport event handling. When not specified, this is "PLUGIN". See Language:teleport cause for causes.

Instead of a valid entity, an unspawned NPC or an offline player may also be used.

Optionally specify "relative" to use relative teleportation (Paper only). This is primarily useful only for players, but available for all entities.
Relative teleports are smoother for the client when teleporting over short distances.
Optionally, you may use "relative_axes:" to specify a set of axes to move relative on (and other axes will be treated as absolute), as any of "X", "Y", "Z", "YAW", "PITCH".
Optionally, you may use "offthread_repeat:" with the relative arg when teleporting a player to smooth out the teleport with a specified number of extra async packets sent within a single tick.
Optionally, specify "offthread_yaw" or "offthread_pitch" while using offthread_repeat to smooth the player's yaw/pitch to the new location's yaw/pitch.

Optionally, specify additional teleport options using the 'entity_options:' arguments (Paper only).
This allows things like retaining an open inventory when teleporting - see the links below for more information.
See 🔗https://jd.papermc.io/paper/1.19/io/papermc/paper/entity/TeleportFlag.EntityState.html for all possible options.
Note that the API this is based on is marked as experimental in Paper, and so may change in the future.
Related Tags<EntityTag.location> Returns the location of the entity. (...)
Usage Example
# Use to teleport a player to the location their cursor is pointing at.
- teleport <player> <player.cursor_on>
Usage Example
# Use to teleport a player high above.
- teleport <player> <player.location.above[200]>
Usage Example
# Use to teleport to a random online player.
- teleport <player> <server.online_players.random.location>
Usage Example
# Use to teleport all players to your location.
- teleport <server.online_players> <player.location>
Usage Example
# Use to teleport the NPC to a location that was noted with the <@link command note> command.
- teleport <npc> my_prenoted_location
Usage Example
# Use to teleport a player to some location, and inform events that it was caused by a nether portal.
- teleport <player> <server.flag[nether_hub_location]> cause:nether_portal
Usage Example
# Use to teleport the player without closing their currently open inventory.
- teleport <player> <player.location.below[5]> entity_options:retain_open_inventory
Synonyms (Search Aid)tp
Groupentity
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/TeleportCommand.java#L39

ObjectType


NameJavaReflectedObjectTag
Prefixreflected@
Base TypeElementTag
Identity FormatThe identity format for JavaReflectedObjectTag is a random UUID that is associated with a temporary lookup to reduce reparsing risk.
DescriptionJavaReflectedObjectTag represent raw Java objects for reflection-based interactions in Denizen.
This is only useful in certain interop edge cases, and should usually be avoided.
They have no persistent identity, and instead only use a temporary generated UUID for the identity to allow reconstruction by lookup.
Two different JavaReflectedObjectTag might simultaneously refer to the same underlying Java object, despite having different IDs.
A Java object should not be retained in flags or other long term storage, as they will necessarily become invalid quickly.
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/JavaReflectedObjectTag.java#L20