Staff mode
The staffmode module gives staff a dedicated working mode: inventory set aside, tools in the hotbar, invisibility and protections. Files: config/staffmode.yml, staffmode/modes.yml, staffmode/modules.yml, staffmode/custom-modules.yml.
Entering staff mode
Section titled “Entering staff mode”/staff [-mode=<name>] aliases /modestaff, /staffmode/sfly toggle flight in staff mode-
On entry, the staff member’s inventory, position, health, hunger, experience, effects and game mode are saved persistently (even across a crash or server stop).
-
The highest-weight mode the staff member has permission for is applied: hotbar items, vanish, flight, invulnerability, night vision…
-
On exit, the saved state is restored and the staff member returns to their entry point (
original-locationoption).
/staff -mode=<name> forces a specific mode; it requires cobaltstaff.mode.specific and the mode’s permission. With restore-on-shutdown: true, staff cleanly leave the mode when the server stops or the plugin reloads.
Modes and inheritance
Section titled “Modes and inheritance”Modes are described in staffmode/modes.yml. The default mode is mandatory; the others inherit (extends) and only override what changes.
Guide: extends: default permission: cobaltstaff.mode.guide weight: 10 items: compass: 0 random-teleport: 1 examine: 4 details: 5 reports: 7 counter: 8
Modo: extends: Guide permission: cobaltstaff.mode.modo weight: 20 items: vanish: 2 freeze: 3 cps: 6 follow: 9 # 9-35 = inventory spectate: 10Bundled modes: Guide, Modo, SuperModo, Responsable, Admin and Enquete (weight -1: never picked automatically, used by investigations).
Mode options
Section titled “Mode options”| Option | Effect |
|---|---|
block-manipulation |
Break and place blocks |
inventory-interaction |
Move items in one’s inventory (staff items stay locked) |
silent-chest-interaction |
Edit chests opened silently (with cobaltstaff.mode.silent-chest-interaction) |
item-drop, item-pickup |
Drop, pick up |
vanish-type, vanish-on-enter |
Vanish type (TOTAL, LIST, PLAYER, NONE) and vanish on entry |
staff-see-staff-in-mode |
Staff in staff mode see each other, even vanished |
invincible, damage |
Takes no damage, can deal damage |
hunger-loss |
Loses hunger |
flight, creative, night-vision |
Flight, creative, night vision |
original-location |
Return to the entry point on exit |
enable-on-login |
Enters staff mode on login |
disable-on-logout |
Leaves the mode on logout (otherwise restored on reconnect) |
disable-on-world-change |
Leaves the mode when changing worlds |
allowed-worlds |
Allowed worlds ([] = all) |
enable-commands, disable-commands |
Commands run on entry and exit (%player%, %mode%) |
initial-item-states |
State of toggle items on entry (e.g. vanish: on) |
items |
<id>: <slot> (0-8 = hotbar, 9-35 = inventory, -1 = remove an inherited item) |
Hotbar items
Section titled “Hotbar items”| Id | Action |
|---|---|
compass |
Launches the staff member in the direction they look |
random-teleport |
Teleports to a random player or each player in turn (random-teleport.mode: RANDOM or ROTATION) |
vanish |
Toggles vanish (item on or off) |
hub |
Opens the staff hub |
counter |
Online staff list, click = teleport |
freeze |
Freezes or unfreezes the targeted player |
cps |
Starts a CPS test on the targeted player |
examine |
Opens the targeted player’s inventory |
follow |
Attaches to the targeted player |
details |
Opens the targeted player’s profile |
spectate |
Spectates the targeted player |
reports |
Opens report management; shows the number of pending reports |
Materials and permissions are set in staffmode/modules.yml. An item can be a Nexo item.
Custom items
Section titled “Custom items”staffmode/custom-modules.yml lets you create your own tools:
| Type | Action |
|---|---|
COMMAND_STATIC |
Command run as the staff member (click in the air) |
COMMAND_DYNAMIC |
Command run as the staff member on the targeted player |
COMMAND_CONSOLE |
Command run by the console, with or without a targeted player |
ITEM |
Plain item, no action |
Bundled example, a quick ban that asks for the reason in chat then a confirmation:
ban-rapide: type: COMMAND_DYNAMIC material: blaze_rod enchanted: true permission: cobaltstaff.bans.tempban command: "tempban %clicked% 1d %input%" require-input: true input-prompt: staffmode.custom.ban-rapide.saisie confirmation: GUI # CHAT, GUI or NONE confirmation-message: staffmode.custom.ban-rapide.confirmationVariables: %clicker% (the staff member), %clicked% (the targeted player), %input% (the typed input).
Vanish
Section titled “Vanish”/vanish [TOTAL|LIST|PLAYER] [player] [enable|disable] aliases /v, /invisibleInvisible in game and hidden from the player list (tab). Default type.
Visible in game, but hidden from the player list.
Invisible in game, but still in the list. With packetevents, the tab line is kept; without it, the line is removed too.
- Staff with
cobaltstaff.vanish.seecan see vanished players. - Vanishing another player requires
cobaltstaff.vanish.others.<type>. - Options (
vanishinconfig/staffmode.yml): keep vanish on reconnect, fake join and quit messages, bossbar or action bar reminder, silent chests, mobs ignoring the player, invulnerability, night vision, pressure plate blocking… - Vanished players are hidden from command completion (
commands.hide-vanished-in-tab).
Spectate
Section titled “Spectate”/spec [player] aliases /spectate, /observerThe staff member becomes a spectator attached to the player; without an argument, they return to their original position (spectate.return-to-location).
Freeze
Section titled “Freeze”/freeze <player> [-T<location>] [-S] [-H<n>] alias /geler/fc [id|player] <message> freeze channelA frozen player can no longer move. Freeze options:
| Argument | Effect |
|---|---|
-T<location> |
First teleports the player to a predefined location |
-S |
Removes their armour (stored in the inventory) |
-H<n> |
Sets their health to n % |
- Title, subtitle, sound and periodic reminder; optional “prompt” window that reopens while the player is frozen.
- Freeze channel: a conversation automatically opens between the frozen player and the staff (
/fc), and closes on unfreeze. - Commands allowed while frozen:
freeze.allowed-commands(msg,r,tell,wby default). - Logout: the freeze is kept on reconnect, and commands can be run (
logout-commands), for example an automatic ban. cobaltstaff.freeze.bypassprotects a player from being frozen.
Staff list and hub
Section titled “Staff list and hub”/personnel online staff and their state aliases /stafflist, /listestaff/staffhub staff hub alias /hubstaff/personnel lists connected staff (permission cobaltstaff.member) with their mode and vanish; a vanished staff member you cannot see shows as “away” (vanish.show-away).
The staff hub gathers in one menu the shortcuts to reports, investigations, bans, mutes, warns, appeals, players, miners, protected areas, staff locations, staff list and audit log. Each button (slot, material, command, permission) is configured in hub.buttons.
LuckPerms contexts
Section titled “LuckPerms contexts”If LuckPerms is installed, CobaltStaff provides the cobaltstaff:staffmode, cobaltstaff:vanished and cobaltstaff:frozen contexts (true/false). You can then grant a permission only in staff mode:
/lp group moderateur permission set minecraft.command.gamemode true cobaltstaff:staffmode=true