States
The twelve states an ability can put on a player — invulnerable, frozen, silenced, lifesteal, flight, vanished, last stand and the rest — what each one does, how long it lasts and how it is shown.
A state is a temporary condition on a player, given by the flag step and taken away by unflag or when it
runs out:
- action: flag
flag: FROZEN
seconds: 3Giving a state a player already has replaces it: the new length starts from now. A negative seconds lasts
until it is removed, the player dies or leaves. With states.clear-on-death (default true) every state ends on
death; every state ends when the player leaves.
While a state lasts the player sees a boss bar counting it down, for example ❄ FROZEN » 2.4 ⌚. Each bar is
under states.<state> in messages.yml and can be changed to a title, action bar, sound or nothing.
The states
| State | What it does |
|---|---|
INVULNERABLE | No damage, except the void and /kill. |
FROZEN | Cannot move from their block. They can still look around. |
NO_BUILD | Cannot place or break blocks. With only, just those blocks. |
NO_ITEM_USE | Cannot use items, eat or drink, and cannot glide with an elytra (gliding stops when it starts). With only, just those items. |
EFFECT_IMMUNITY | New or changed potion effects are refused. With only, just those effects. |
UNSTOPPABLE | No knockback, and Slowness, Mining Fatigue and Weakness are refused. |
SILENCED | Special items are refused: "Your special items are silenced." |
LIFESTEAL | Melee damage dealt to players heals the holder by value — a share, 0.5 = half. |
FLIGHT | Can fly, in survival and adventure. When it ends they stop flying and take no fall damage for states.flight-landing-grace (4 s), told "Your flight has ended." |
NO_FALL_DAMAGE | No fall damage. |
VANISHED | Hidden from every player, including those who join later. With states.reveal-on-attack (default true) attacking someone reveals them: "You struck from the shadows and were revealed." |
UNDYING | One lethal hit — except the void and /kill — is refused: the player is healed to value of their maximum health (default 0.5), fire and falling are cleared, states.undying-effects play and a LAST STAND title shows. The state then ends. |
Names are case-insensitive, and no-build works as well as NO_BUILD.
Narrowing with only
NO_BUILD, NO_ITEM_USE and EFFECT_IMMUNITY take an only list. Empty means everything.
For NO_BUILD and NO_ITEM_USE an entry is a material or a group:
| Entry | Matches |
|---|---|
COBWEB | That material. |
@FOOD | Anything edible. |
@POTION | Potions. |
@BLOCK | Any block. |
@SWORD, @PEARL... | Materials whose name ends with _SWORD, _PEARL... |
- action: flag
flag: NO_ITEM_USE
seconds: 10
only: ['@FOOD', '@POTION'] # cannot eat or drink, can still fightFor EFFECT_IMMUNITY the entries are effect names:
- action: flag
flag: EFFECT_IMMUNITY
seconds: 60
only: [POISON, WITHER, LEVITATION]Checking a state
- In a chain:
requirewithflag:ormissing-flag:. See Action language. - Anywhere:
%exyliaspecials_state_<state>%and%exyliaspecials_state_<state>_remaining%. See Placeholders. - From another plugin:
isFrozenandisInvulnerable. See API.
Settings
Under states: in config.yml:
| Key | Default | What it does |
|---|---|---|
clear-on-death | true | Every state ends on death. |
flight-landing-grace | 4s | No fall damage for this long after FLIGHT ends. |
reveal-on-attack | true | VANISHED ends when its holder attacks. |
undying-effects | three lines | Effect lines played when UNDYING saves a player. |
Something missing on this page? Tell us on Discord