# Triton Placeholders
This, along with translations, is by far the most complex part of the plugin. So let's dive in!
Before processing though, make sure you've read the translations concept already.
# What are Triton Placeholders?
A Triton Placeholder looks like this:
It looks just like BBCode (opens new window), so it's really easy to get started!
# Placeholder Syntax
Triton placeholders are composed by the boilerplate tags and its content.
Tags such as
[/arg] are considered
boilerplate because they don't have any meaning when it coming to identifying which
translation you want.
If you want, these tags can be changed in the config.
However, it's inside those tags that you can place the content you want, such as the translation key and arguments (or variables).
This placeholders should be placed inside the messages configuration files of other plugins, on holograms, items, etc, so that Triton can detect them when the packets are sent to the player.
# Simple placeholders
Simple placeholders are those that don't have any arguments.
It's syntax is very simple:
If you replace
translation.key.here with the key of the translation you want,
that placeholder will be replaced with the translation in the language of the player.
Since various kinds of text in Minecraft have length limits, most plugins truncate those texts if they would cause the client to crash.
Because of that, Triton might not be able to detect a placeholder if it has been truncated. To fix that, reduce the key length and try again.
# Advanced placeholders (using variables)
To add the arguments to the placeholder, you need to use two more boilerplate tags:
The first tag,
[args], tells the plugin that this placeholder contains variables.
The second one,
[arg], tells the plugin what are the values of those variables.
All the content between the
[/arg] tags will be treated as a variable
and passed to the translation content.
If you remember correctly, you define variables in the translation using
These will be replaced with the content inside the
[arg] tags, in order
[arg] tag will be
%1, the second will be
%2 and so on).
You can nest placeholders if you want.
When using this inside another plugin, you can place their variables inside the