Content generated with AI — it may contain mistakes.

Modules

Staff mode

The session, the snapshot, the hotbar of tools, the spectator view, and what a staff member cannot do on duty.

Staff mode is a session. Entering it saves a snapshot of the player, applies the staff state and shows a hotbar of tools; leaving restores the snapshot. The session is a row in the database, so it survives a relog and follows the player to another server sharing the same database, and it is what the staff log counts.

Module id staffmode, switch modules.staff-mode, files under modules/staffmode/. Needs PacketEvents: the hotbar is a client-side overlay.

Entering

/staff, or /staffmode and /mod, with exyliastaff.staff and exyliastaff.staffmode. In order:

  1. The player is refused with "Finish what you are doing first" if another plugin holds them in an activity, for instance a match or an event.
  2. Whether they were already vanished is remembered.
  3. A snapshot is saved and the staff_sessions row written. Only then is the player touched.
  4. Game mode, flight and invulnerability are applied, health and food are filled, the hotbar and the uniform are shown, the nametag is coloured for other staff, and the staff-mode sidebar appears.
  5. If auto-vanish is on and they were visible, they vanish silently.
  6. The enter effect plays and the session starts.

While on duty the player is excluded from every cosmetic plugin built on the library and counted as a watcher for every isolating mode, so a match or an event does not hide the server from them.

Leaving

/staff again, the barrier in the hotbar, /staff off, losing a permission, or an admin. The row is deleted first, then the snapshot is restored: armour, game mode, flight, health and hunger, plus a teleport back to where the session began when restore-location is on. Vanish is turned off if the player was visible before entering and restore-vanish is on. Every module is told the shift ended: staff chat, x-ray vision, mining alerts and open inventory mirrors close with it.

Losing exyliastaff.staff or exyliastaff.staffmode while online is noticed within five seconds and ends the session with "You lost permission for staff mode".

Relogs and servers

exit-on-quit is off by default: a quit keeps the row, and the next join on any server with the same database resumes the session, with "Staff session resumed" and the elapsed time. A /stop keeps every session for the same reason. A row whose snapshot is gone is deleted; a snapshot with no row is restored silently, so a crash never leaves a staff member in the uniform.

The hotbar

modules/staffmode/hotbar.yml is copied out of the jar once and then left alone. Every entry names a slot, an item and what a click runs; an entry tagged module: <id> only shows while that module is enabled, and an entry with permission: only shows to players holding it.

SlotItemLeft clickRight click
0ClockJump to the block you look atPhase through the wall
1Lime or gray dyeToggle vanish
3Music discRandom player
5BookEnder chest of the player you look atInventory of the player you look at
7Netherite axePunish the player you look at
8Packed iceFreeze or unfreeze the player you look at
9Ender eye or pearlSpectator view
12Blaze powderOpen reports
14Turtle helmetOpen help requests
17BarrierLeave staff mode
27Diamond or iron pickaxeSuspicious minersToggle mining alerts
28Writable book or bookToggle staff chat
29Glowstone or gray glassToggle x-ray vision
30Bell or chainCycle global chat
34Your headStaff list
35Written bookYour staff log

The two-item entries show one item or the other by reading a placeholder such as %staff_vanished%, so the hotbar redraws itself when the state flips. Right clicking with an empty hand on a chest opens it silently. Slots go from 0 to 35, plus offhand, helmet, chestplate, leggings and boots. The four armour pieces are drawn on the client too, over whatever the staff member is really wearing, so a session that ends anywhere leaves no staff gear behind. Nothing in the hotbar or the armour slots ever enters the inventory.

Actions are written as staff:<name>; commands as player: <cmd>, console: <cmd> or player-proxy: <cmd>. Clicks can be left, right, shift_left, shift_right, drop, swap, middle and more. The bundled file has a commented CoreProtect example.

Spectator view

/staff spectator, or /staff spec, or the ender eye: real spectator game mode, to fly through walls and follow a player. Toggling it off puts the configured staff game mode back. The panel's Follow button uses it.

What staff cannot do

AlwaysConfigurable in block
Damage anything, including with projectilesPick up items (pickup)
Drop, move or swap items; write creative slotsBreak blocks (block-break), place them (block-place)
Wear items down (item-damage), lose hunger (hunger)

Mobs never target a staff member while invulnerable is on.

Configuration

plugins/ExyliaStaff/modules/staffmode/config.yml
gamemode: ADVENTURE
fly: true
invulnerable: true
auto-vanish: true
restore-vanish: true
exit-on-quit: false
restore-location: true
block:
  pickup: true
  block-break: true
  block-place: true
  item-damage: true
  hunger: true
nametag-color: AQUA
scoreboard: true
effects:
  enter:
    title:
      text: '{primary}&lSTAFF MODE'
      subtitle: '{letters}Enabled'
      stay: 2.0
      fade-out: 0.5
    sound:
      name: BLOCK_NOTE_BLOCK_PLING
      pitch: 1.5
  exit:
    title:
      text: '{primary}&lSTAFF MODE'
      subtitle: '{letters}Disabled'
      stay: 2.0
      fade-out: 0.5
    sound:
      name: BLOCK_NOTE_BLOCK_PLING
      pitch: 0.8
KeyDefaultWhat it does
gamemodeADVENTUREGame mode on duty. An unknown value falls back to adventure. Creative always allows flight.
flytrueAllow flight.
invulnerabletrueNo damage taken, no mob targeting.
auto-vanishtrueVanish on enter. Needs the vanish module.
restore-vanishtrueUnvanish on exit when the player was visible before entering.
exit-on-quitfalseEnd the session on quit instead of resuming it on the next join.
restore-locationtrueTeleport back to where the session began.
nametag-colorAQUAColour of the name as seen by other staff. Empty or unknown for none.
scoreboardtrueShow the staff-mode sidebar. Needs the scoreboard module.
effects.enter, effects.exitLibrary effects: title, action bar, boss bar, sound, particle, firework.

Messages

modules/staffmode/messages.yml: enabled, disabled, already-enabled, already-disabled, enabled-other and disabled-other with %target%, permission-lost, session-removed, session-resumed with %time%, disabled-by-module, spectator-on, spectator-off, and busy with %activity% and %plugin%.

Placeholders

PlaceholderValue
%staff_staffmode_status%true while the viewer has a session.
%staff_staffmode_time%Session time as a clock, empty out of staff mode.
%staff_staffmode_spectator%true in spectator view.
%staff_mode%true while in staff mode, from the core.
%staff_in_mode%Players in staff mode on this server.

Something missing on this page? Tell us on Discord