Custom Variables
Last updated
Last updated
When creating a custom variable, you define conditions that must be met to display certain text. These conditions can be specified within various contexts, such as Player, Target, Server, DiscordUser, or DiscordChannel.
(also known as Available Variables) are used like this: {Server.MapName}, where each default variable overrides the input with a single value. However, Custom Conditions are used like this: [Server.YourCustomVariable], these custom variables can display different texts based on the conditions met.
So, in short, Default Variables, already implemented in the plugin, are enclosed within {XX}
, while your Custom Variables are enclosed within [XX]
, distinguishing them from each other.
Value
- The value that will be checked (You can use Default Variables)
Operator
- What condition must be met
ValueToCheck
- The value that will be compared with Value
(You can use Default Variables)
ReplacementValue
- Result if the condition is met
==
: Means "equals". This condition is met if the Value is equal to the ValueToCheck
!=
: Means "not equals". This condition is met if the Value is not equal to the ValueToCheck
~
: Means "contains". This condition is met if the Value contains the ValueToCheck
>=
: Means "greater than or equal to". This condition is met if the Value is greater than or equal to the ValueToCheck
<=
: Means "less than or equal to". This condition is met if the Value is less than or equal to the ValueToCheck
>
: Means "greater than". This condition is met if the Value is greater than the ValueToCheck
<
: Means "less than". This condition is met if the Value is less than the ValueToCheck
empty : Leave operator empty ("Operator": "",
), to override variable if none of the previous conditions are met (And this condition must always be the last one)
{Replace(VALUE1)(VALUE2)} - The value in the first brackets is overwritten by the value in the second brackets
We create a Custom Variable that:
• When the server is empty, display "Server Is Empty"
• When there are more than 0 players on the server, display: "Number of players on the Server"