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 2425 tags...
Name<&translate[key=<key>;(fallback=<fallback>);(with=<text>|...)]>
ReturnsElementTag
DescriptionReturns a special chat code that is read by the client to display an auto-translated message.
"key" is the translation key.
Optionally specify "fallback" as text to display when the client can't find a translation for the key.
Optionally specify "with" as a list of input data for the translatable message (parts of the message that are dynamic).
Be warned that language keys can change between Minecraft versions.
Note that this is a magic Denizen tool - refer to Language:Denizen Text Formatting.
You can use Tag:ElementTag.strip_color to convert the translated output to plain text (pre-translated).
Example
Narrates a translatable of a diamond sword's name.
- narrate "Reward: <&translate[key=item.minecraft.diamond_sword]>"
Example
Narrates a translatable with some input data.
- narrate <&translate[key=commands.give.success.single;with=32|<&translate[key=item.minecraft.diamond_sword]>|<player.name>]>
Example
Narrates a custom translatable (from something like a resource pack), with a fallback in case it can't be translated.
- narrate <&translate[key=my.custom.translation;fallback=Please use the resource pack!]>
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/TextTagBase.java#L183