-
Notifications
You must be signed in to change notification settings - Fork 3
Conditions
Conditions are fairly self-explanatory, they allow you to ensure certain criteria has been met before doing an effect. There can be multiple conditions for any single skill.
In order to use conditions, you (typically, may vary with implementations) add a conditions block inside of the trigger. Here is the most simple condition use case.
conditions:
a_condition_name_of_your_choosing:
type: WEATHER
mode: SELF
else:
#effects
a_second_condition_name_of_your_choosing:
type: ...
mode: ...
...
This is an example of the Weather Condition (you can tell it's the weather condition due to type: WEATHER) and this would make the skill only happen when it is raining. The mode "SELF" part tells the plugin to check the weather of the world of the person using the Skill. If you had mode set to OTHER or BLOCK, then it would check the weather of the other entity / block being targeted.
Not all conditions are this simple though, some conditions will have additional parameters! In order to find out what parameters each condition needs, check their individual conditions page.
The else block is a new addition to Conditions, and allows you to trigger an effect when a condition is not met. This is useful largely for adding messages explaining why a skill has not went through like a cooldown message.
- What are Conditions?
- List of all Conditions
- NOT Condition
- Weather Condition
- Tamed Condition
- Height Condition
- Metadata Condition
- Shielded Condition
- Light Condition
- Shooter Condition
- Health Condition
- Entity Condition
- Cooldown Condition