You can create action groups in the actiongroups.yml file.
The syntax is as follows: the group's name, followed by a list of either actions, or conditions which can have both success actions and deny actions.
Here's an example, this will only run the success actions if the player's name is "Tanguygab"
Code (YAML):
test:
- "msg
: Start
"
- condition: "
%player_name%==Tanguygab"
success:
- "msg
: Hi me!
"
- "msg
: How's it going?
"
deny: "msg
: Who are you? o_O
"
- "msg
: End
"
Conditions can either be a simple check like above, or the name of a condition defined in conditions.yml (see below)
I'm too lazy to write the list of actions here so if you can wait tomorrow that'd be nice, thanks
Speaking about conditions, if you open your conditions.yml file, you'll see that it's split between "conditions" and "conditional-outputs".
Conditions are defined with a name and a subcondition or a list of subconditions.
Available Subconditions are:
- text1=text2 - Checks if text1 matches text2. Not case sensitive.
- text1==text2 - Checks if text1 matches text2. Case sensitive.
- >, <, >= and <= can be used to compare numbers.
- text<-word - Checks if the word is inside the text
- text|-word - Checks if the text starts with the word
- text-|word - Checks if the text ends with the word
If you want to negate a condition, you can use ! in front of it to invert it; example: !text<-word will check if the text does not contain the word.
Conditions can be used in other plugins with %condition_<condition name>%
You can of course use conditions within other conditions.
Conditional Outputs are defined with a name, and a series of Text: Condition
If the conditions is met, the text will be displayed, otherwise it'll try to check other conditions. The plugin checks conditions from top to bottom.
To use conditional outputs in other plugins, use %conditionalactions_output_<name>%
PlaceholderAPI is supported everywhere.