Custom Variables
Custom variables is a feature that allows you to create and use your own variables. These variables can contain conditions that affect the output text.
How do Custom Variables Work?
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.
How to Use a Custom Variable
Default Variables (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.
How to Setup a Custom Variable
Value
- The value that will be checked (You can use Default Variables)Operator
- What condition must be metValueToCheck
- The value that will be compared withValue
(You can use Default Variables)ReplacementValue
- Result if the condition is met
Available Conditions (Operators)
==
: 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 ValueToCheckempty : Leave operator empty (
"Operator": "",
), to override variable if none of the previous conditions are met (And this condition must always be the last one)
Available Functions
{Replace(VALUE1)(VALUE2)} - The value in the first brackets is overwritten by the value in the second brackets
Examples
Last updated