just pushing what i have the ui is still broken
This commit is contained in:
@@ -45,6 +45,7 @@ External dependencies:
|
||||
| [listener/BanEnforcer.java](../src/main/java/net/kewwbec/staff/listener/BanEnforcer.java) | `PlayerSetupConnectEvent` -> cancel + set reason if banned. |
|
||||
| [listener/ChatEnforcer.java](../src/main/java/net/kewwbec/staff/listener/ChatEnforcer.java) | `PlayerChatEvent` -> cancel if muted; otherwise route to staff chat if toggle is on. |
|
||||
| [listener/PlayerSeenTracker.java](../src/main/java/net/kewwbec/staff/listener/PlayerSeenTracker.java) | Connect/disconnect -> update players_seen, load/clear mute cache, clear staff-chat toggle. |
|
||||
| [listener/StaffPresenceListener.java](../src/main/java/net/kewwbec/staff/listener/StaffPresenceListener.java) | Connect/disconnect of staff -> announce on staff chat when they actually join/leave the **network** (suppresses server transfers via NetworkCore PlayerPresence + a configurable delay). |
|
||||
| [command/punish/PunishmentCommands.java](../src/main/java/net/kewwbec/staff/command/punish/PunishmentCommands.java) | All 8 punishment commands as nested classes. |
|
||||
| [command/chat/StaffChatCommand.java](../src/main/java/net/kewwbec/staff/command/chat/StaffChatCommand.java) | `/sc` - toggles staff-chat-mode for the caller. |
|
||||
| [command/lookup/LookupCommand.java](../src/main/java/net/kewwbec/staff/command/lookup/LookupCommand.java), [HistoryCommand.java](../src/main/java/net/kewwbec/staff/command/lookup/HistoryCommand.java) | `/lookup`, `/history`. |
|
||||
|
||||
@@ -15,6 +15,10 @@
|
||||
"tables": {
|
||||
"punishments": "staff_punishments",
|
||||
"players_seen": "staff_players_seen"
|
||||
},
|
||||
"presence": {
|
||||
"announce_staff_join_leave": true,
|
||||
"leave_suppression_seconds": 10
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -37,6 +41,15 @@ Permission gating no longer lives here. Each command checks a permission node (`
|
||||
| `punishments` | `"staff_punishments"` | Table name. Change only if you really need to and you're prepared to migrate data. |
|
||||
| `players_seen` | `"staff_players_seen"` | Same. |
|
||||
|
||||
### presence
|
||||
|
||||
| Field | Default | Meaning |
|
||||
|---|---|---|
|
||||
| `announce_staff_join_leave` | `true` | When a staff member (anyone with `networkstaff.chat`) joins or leaves the **network**, announce on the staff chat channel. Server-to-server transfers via `/send` or `/hub` are suppressed. |
|
||||
| `leave_suppression_seconds` | `10` | After a disconnect, wait this many seconds before declaring the player has "left the network." If they reconnect anywhere (any server) in that window, no leave message is sent. Tune higher if your transfers take longer than 10s; tune lower for snappier announcements at the cost of false positives. |
|
||||
|
||||
Requires NetworkCore's `PlayerPresence` service. If NetworkCore isn't running or PlayerPresence is unavailable, presence announcements are silently skipped (with a warning in the boot log).
|
||||
|
||||
## Setting up staff permissions
|
||||
|
||||
1. In your Hytale server's permission config, create a `staff` group (or whatever you want to call it).
|
||||
|
||||
+1
-1
@@ -102,7 +102,7 @@ This is simpler than HyUI's `updatePage(true)` re-render dance and keeps each pa
|
||||
- `<div class="page-overlay">` - root, dims background, captures input
|
||||
- `<div class="container" data-hyui-title="...">` - main framed window with header
|
||||
- `<div class="container-contents">` - inner content area
|
||||
- `<button id="...">Text</button>` - clickable button (use `class="back-button"` for back-themed)
|
||||
- `<button id="...">Text</button>` - clickable button. **Don't use `class="back-button"`** with inline HTML - that class triggers HyUI's `BackButton.ui` template which expects a nested `#HyUIButton` child that inline buttons don't have, and your `Activating` listener fails to bind with "Target element... has no compatible Activating event". Plain `<button>` works for back buttons too; style separately if you need a different look.
|
||||
- `<input type="text" id="..." value="..." placeholder="...">` - text input
|
||||
- `<p>` / `<label>` - text
|
||||
|
||||
|
||||
Reference in New Issue
Block a user