Give a class passive effects
Add effects a class keeps while worn, or only while a condition is true, such as being below a Y level.
At the end of this page a class gives its players potion effects for as long as they wear it, and optionally extra effects only while a condition is true, such as being below Y 40 (the Miner turns invisible underground).
Before you start#
You need a class file to edit: see Edit or add a class.
Steps#
Open the class file
Open plugins/ExyliaClasses/lang/<language>/classes/<Class>.yml.
Add the always-on effects
Under passive-effects, one line per effect, written NAME|LEVEL. The level is what a player reads: SPEED|3 is Speed III.
passive-effects:
- SPEED|3
- DAMAGE_RESISTANCE|2Add a conditional effect (optional)
Under special-passives, give a condition type, a value and the effects:
special-passives:
- type: "BELOW_Y"
condition: "40"
effects:
- INVISIBILITY|1Reload
Run /classesadmin reload.
Check that it works#
Put on the armour and wait for the warmup: the passive effects show in your status icons. For a BELOW_Y passive, go below that Y level (check with F3): the effect appears within a second and goes when you climb back above it. Take the armour off and everything goes.
Going further#
More than one conditional effect#
The list takes more than one entry, and each is tracked separately:
special-passives:
- type: "BELOW_Y"
condition: "40"
effects:
- INVISIBILITY|1
- type: "BELOW_Y"
condition: "0"
effects:
- FIRE_RESISTANCE|1
- NIGHT_VISION|1The Miner ships with the first of those two, invisible below Y 40. The second is the same idea one layer deeper.
A Rogue's permanent INVISIBILITY|1 and an invisibility potion the player drank are the same effect. Leaving the class removes it, potion included.
Technical details
Passive effects. A flat list of effect lines, applied when the class activates and taken back when it is removed. They are always applied infinite, whatever duration the line carries, and removed by name, so a class ending never clears potion effects a player got from somewhere else. They are re-applied when a player is saved by a totem of undying, which would otherwise strip them.
Special passives. Checked once a second for every player in a class that declares them: the effects go on the moment the condition becomes true and come off the moment it stops being true. Everything a special passive granted is removed when the class is removed, along with the ordinary passives, including if the player dies or logs out while the condition is true.
| Key | What it is |
|---|---|
type | The condition type. BELOW_Y is the only one. |
condition | The value the type reads. For BELOW_Y, a Y coordinate. |
effects | Effect lines, applied infinite while the condition holds. |
| Type | True when |
|---|---|
BELOW_Y | The player's Y is strictly below condition. A condition that is not a number is always false. |
An unknown type is logged and the entry is dropped.
Something missing on this page? Tell us on Discord