Last updated
Last updated
DeluxeTeleport includes PlaceholderAPI support, allowing you to use custom variables in other plugins. The available variables are not predefined; you can create them yourself in the placeholders.yml file, within the placeholders section.
How to Create Variables
Creating new variables is very simple. Simply add a new section in the file placeholders.yml
. For example:
Within these variables, you can use color codes using the &
symbol, as well as values āāin HEX format since version 1.16. Additionally, you can combine internal DeluxeTeleport variables and PlaceholderAPI variables.
Using Variables
Once you have created your variable, you can use it in other plugins using the following syntax:
For example, if you created a variable called example_variable
, you would use it like this:
You can also create variables that return different values āādepending on their result. Here's how you can create conditional variables.
input
: This is the variable to be evaluated to check the conditions. You can use any PlaceholderAPI variable or an external one.
matchs
: The conditions to be checked are defined here.
void: Indicates that the variable is empty.
1: If the input
value is 1, it will return &b1
.
0-2: If the value is between 0 and 2, it will return &a%naruland_spawn_cooldown_time%
.
3-5: If the value is between 3 and 5, it will return &e%naruland_spawn_cooldown_time%
.
>=6: If the value is greater than or equal to 6, it will return &c%naruland_spawn_cooldown_time%
.
else: If none of the above conditions are met, it will return &4%naruland_spawn_cooldown_time%
.
Comparisons
You can compare a value directly or use expressions like -
, !=
, >
, <
, >=
, <=
, ==
.
Do not use empty comparisons like "": ""
, as this will result in an error. Instead, use void: ""
.