Conditions: types and operators
Conditions in resources/conditions/ return pass/fail and do not execute effects by themselves. Each condition type has specific arguments.
| Family | Engine types |
|---|---|
| Logic | ALL/AND, OR/ANY, NOT |
| Reference | REFERENCE/REF/CONDITION |
| Player | PERMISSION/PERM, WORLD, GAMEMODE |
| Numbers | LEVEL, HEALTH, HEALTH_PERCENT |
| Items/values | ITEM, VALUE/PLACEHOLDER |
| Player data | VARIABLE/VAR, FLAG, TIMER |
| Other | CHANCE, COOLDOWN, TRUE, FALSE |
Numeric operators: >, >=, <, <=, ==, =, !=, <>. For strings: CONTAINS, NOT_CONTAINS, STARTS_WITH, ENDS_WITH, MATCHES/REGEX. Behavior depends on the condition type.
Advanced double-gate example
magic_access:
enabled: true
type: ALL
message: '<red>Requirements not met.</red>'
conditions:
level:
type: LEVEL
operator: '>='
value: 10
permission:
type: PERMISSION
permission: obsidrel.magic.use
Change ALL to OR to accept either. An Action uses conditions: [magic_access]. COOLDOWN can acquire the cooldown while evaluating, so do not treat it as a read-only check.