Denizen Script Tags


Tags are always written with a <between these marks>, and are critical to scripts, as the primary way to read data.
Learn about how tags work in The Beginner's Guide.


Showing 1 out of 2484 tags...
Name<LocationTag.format[<format>]>
ReturnsElementTag
DescriptionFormats a LocationTag according to a specified format input.
You can request x, y, z, yaw, or pitch as full "f", short "s", or block "b" format.
eg "fx" for "full X coordinate" (like 1.051234), "syaw" for "short yaw" (like 1.03), or "bz" for "block Z coordinate" (like 1).
"world" is also available to get the world name.
If "$" is in the format, only codes prefixed with "$" will be replaced, eg "$bx but not bx" will become "5 but not bx" (allowing the safe use of unpredictable text inside the format block).
Example
# This example does a simple format, like "1, 2, 3".
- narrate "You are at <player.location.format[bx, by, bz]>"
Example
# This example adds colors, uses the "$" prefix to be safe from bugs, and formats like "You are at y = 32 in Space".
- narrate "<&[base]>You are at <player.location.format[y = <&[emphasis]>$by <&[base]>in <&[emphasis]>$world]>"
Groupidentity
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L3151