actually bruh
This commit is contained in:
+43
-5
@@ -1,6 +1,29 @@
|
||||
# Commands
|
||||
|
||||
All commands require the caller to be in one of the `staff_groups` from config. Player-only (no console support yet).
|
||||
Player-only (no console support yet). Every command is gated by a Hytale permission node.
|
||||
|
||||
## Permissions
|
||||
|
||||
| Command | Required permission |
|
||||
|---|---|
|
||||
| `/ban` | `networkstaff.ban` |
|
||||
| `/tempban` | `networkstaff.tempban` |
|
||||
| `/mute` | `networkstaff.mute` |
|
||||
| `/tempmute` | `networkstaff.tempmute` |
|
||||
| `/kick` | `networkstaff.kick` |
|
||||
| `/warn` | `networkstaff.warn` |
|
||||
| `/unban` | `networkstaff.unban` |
|
||||
| `/unmute` | `networkstaff.unmute` |
|
||||
| `/sc` | `networkstaff.chat` (also required to *receive* staff chat) |
|
||||
| `/lookup` | `networkstaff.lookup` |
|
||||
| `/history` | `networkstaff.history` |
|
||||
| `/staffui` | `networkstaff.ui` |
|
||||
|
||||
Grant `networkstaff.*` to give a group everything. Without the relevant node, Hytale's command system blocks the call before our handler runs - the user sees the standard `You do not have permission for this command.` message.
|
||||
|
||||
Permissions are wired via `AbstractCommand.requirePermission(node)` in each command's constructor. We also override `canGeneratePermission()` to return false so Hytale doesn't auto-generate a different permission name and gate on that instead.
|
||||
|
||||
Receiving staff chat also requires `networkstaff.chat`, so a moderator who can read it can also send to it. If you want separate read/send permissions later, split the check in [StaffChatService.java](../src/main/java/net/kewwbec/staff/service/StaffChatService.java) into two nodes.
|
||||
|
||||
## Punishments
|
||||
|
||||
@@ -38,11 +61,20 @@ Same as unban but for mutes. Also clears the entry from the mute cache on any se
|
||||
|
||||
## Staff chat
|
||||
|
||||
### /sc <message>
|
||||
### /sc
|
||||
|
||||
Broadcasts on the cross-server staff chat channel. Visible only to other players whose `getGroupsForUser` overlaps with `staff_groups`.
|
||||
Toggles **staff chat mode** for you. No arguments. (Hytale command args are single-token, so a multi-word `/sc <message>` doesn't work; the toggle is the workaround.)
|
||||
|
||||
System events (a ban being issued, an unban) also post a line on this channel automatically.
|
||||
When ON:
|
||||
- Anything you type into world chat is intercepted, the regular chat event is cancelled, and the message is broadcast on the cross-server staff chat channel.
|
||||
- Other players who have `networkstaff.chat` see it; nobody else does.
|
||||
- Run `/sc` again to turn it off.
|
||||
|
||||
When OFF: regular chat behaves normally.
|
||||
|
||||
System events (a ban issued, an unban) also post a line on this channel automatically.
|
||||
|
||||
The toggle state lives in memory on this server only and is cleared when you disconnect. If you log into a different server, you'll need to re-toggle.
|
||||
|
||||
## Lookup
|
||||
|
||||
@@ -61,11 +93,17 @@ If the player has never connected, only the name/UUID lookup happens via online
|
||||
|
||||
Last 20 punishment entries for the player, most recent first. Each entry shows id, state (`ACTIVE` / `EXPIRED` / `REVOKED`), type, who issued it, when, and the reason.
|
||||
|
||||
## UI
|
||||
|
||||
### /staffui
|
||||
|
||||
Opens the Staff Hub page. From there: Player Lookup -> select player -> Detail page with action buttons. See [07_UI.md](07_UI.md) for the page flow and how to add new screens.
|
||||
|
||||
## Common error cases
|
||||
|
||||
| Error message | Cause |
|
||||
|---|---|
|
||||
| "You do not have permission to use this command." | Caller isn't in any of `staff_groups`. |
|
||||
| "You do not have permission for this command." | Caller lacks the relevant `networkstaff.<command>` node. Add it (or `networkstaff.*`) to their group. Hytale's command system enforces this before our handler runs. |
|
||||
| "No player found with that name (online or in history)." | Name doesn't match any online player or any name in `staff_players_seen`. |
|
||||
| "Database error: ..." | MySQL query failed. Check NetworkCore connection (`/networkcore status`). |
|
||||
| "Bad duration. Use 30s, 5m, 2h, 7d, 1w." | Duration string didn't parse. Last char must be `s`/`m`/`h`/`d`/`w`, prefix must be a positive integer. |
|
||||
|
||||
Reference in New Issue
Block a user