Skip to main content

Configuring a Condition

Like effects, mutators, and entity goals, conditions consist of an ID and arguments.

Example Condition Config

- id: has_permission
permission: "ecomc.rank.mvp" # The required permission
inverse: true # If the player should *not* have the permission

As shown in the above example, all conditions additionally have an inverse argument, like this:

- id: on_fire
inverse: true

This will negate the condition, i.e. only be true when the base condition is false.

If this condition is for a plugin for items (EcoEnchants, EcoItems, Reforges, Talismans, and EcoArmor) you can also add lore lines to be shown to the player if they don't meet the condition, like this:

- id: has_permission
permission: "ecomc.rank.mvp"
- "&cYou need &bMVP&c rank to use &7Crystal Finder"
- "&cBuy it at &"

Not met Effects

If your condition is effect-specific (i.e. in the conditions: [] section of an effect rather than on the main holder conditions), you can specify not-met-effects.

These are effects ran when the condition is not met but a player tries to activate the effect (invoke the trigger).

In config, they look like this:

- id: give_money
amount: 100
- id: has_permission
permission: "ecomc.rank.mvp"
- id: send_message
message: "&cYou need &bMVP&c rank to use &7Crystal Finder&c, buy it at &!"
- break_block

So here, MVP players would get $100 for breaking a block, whereas non-MVP players would be told to buy the rank to get the perk when they try to break a block. This functions as an alternative to not-met-lines.