Host network staff commands from wc-common; fly/invis on hub #7

Merged
crypt merged 1 commit from codex/wc-core-admin-commands into main 2026-10-03 17:40:30 +00:00
Owner

Summary

Moves the game-agnostic Bukkit admin commands from wc-mcsg into wc-common so every host plugin can register them, and wires /fly + /invis onto the hub — the first concrete step toward "WillowcrestCore commands on every server" (continues the wc.command.* namespace work from 359b86c).

Changes

Relocations (wc-mcsg → wc-common):

  • Commands: FlyCommand, InvisCommand, TpCommand, HealCommand, FeedCommand, ClearChatCommand, InvseeCommand (+InvseeListener), ResetStatsCommand, SetCoinsCommand, DatabaseCommand, StaffStateReceiver
  • Infrastructure: PermissionBridge (now exposes STAFFRELOAD_CHANNEL publicly), OnlinePlayerSource
  • Their 9 test classes move with them; SG-coupled commands (GameStateCommand, VetoCommand, lockchat/spectate) stay in wc-mcsg

Hub (wc-hub):

  • Loads staff.yml via PermissionManager (/config/staff/staff.yml, same mount path as the proxy)
  • Registers PermissionBridge (join/quit attachments + wc:staffreload refresh)
  • Registers the shared StaffStateReceiver, so persisted fly/invis now applies on hub join
  • Registers /fly and /invis (synchronous DB fallback — single small upsert per toggle)
  • chart/templates/hub/deployment.yaml mounts the existing wc-mc-staff-config ConfigMap

Proxy (wc-velocity):

  • Reverses both hub exclusions: staff state now syncs to the hub on transfer, and /staffreload refreshes the hub
  • Null-guard: a StaffStateStore miss syncs the default all-false state instead of NPE

Verification

  • Full plugin build green (all 4 modules, tests + Spotless)
  • Chart lints clean with the new hub staff mount
  • Renames detected cleanly by git (history preserved)

Notes for reviewers

  • The hub intentionally has no OPS env var — staff access there is governed purely by staff.yml; ops-implicit-* remains a game-pod-only concept
  • Staff commands not registered by the hub (tp/heal/invsee/...) remain available on game pods; hosting them on the hub later is now a plugin.yml + two-line wiring change per host
## Summary Moves the game-agnostic Bukkit admin commands from `wc-mcsg` into `wc-common` so every host plugin can register them, and wires `/fly` + `/invis` onto the hub — the first concrete step toward "WillowcrestCore commands on every server" (continues the `wc.command.*` namespace work from 359b86c). ## Changes **Relocations (wc-mcsg → wc-common):** - Commands: `FlyCommand`, `InvisCommand`, `TpCommand`, `HealCommand`, `FeedCommand`, `ClearChatCommand`, `InvseeCommand` (+`InvseeListener`), `ResetStatsCommand`, `SetCoinsCommand`, `DatabaseCommand`, `StaffStateReceiver` - Infrastructure: `PermissionBridge` (now exposes `STAFFRELOAD_CHANNEL` publicly), `OnlinePlayerSource` - Their 9 test classes move with them; SG-coupled commands (`GameStateCommand`, `VetoCommand`, lockchat/spectate) stay in `wc-mcsg` **Hub (`wc-hub`):** - Loads `staff.yml` via `PermissionManager` (`/config/staff/staff.yml`, same mount path as the proxy) - Registers `PermissionBridge` (join/quit attachments + `wc:staffreload` refresh) - Registers the shared `StaffStateReceiver`, so persisted fly/invis now applies on hub join - Registers `/fly` and `/invis` (synchronous DB fallback — single small upsert per toggle) - `chart/templates/hub/deployment.yaml` mounts the existing `wc-mc-staff-config` ConfigMap **Proxy (`wc-velocity`):** - Reverses both hub exclusions: staff state now syncs to the hub on transfer, and `/staffreload` refreshes the hub - Null-guard: a `StaffStateStore` miss syncs the default all-false state instead of NPE ## Verification - Full plugin build green (all 4 modules, tests + Spotless) - Chart lints clean with the new hub staff mount - Renames detected cleanly by git (history preserved) ## Notes for reviewers - The hub intentionally has no `OPS` env var — staff access there is governed purely by `staff.yml`; ops-implicit-`*` remains a game-pod-only concept - Staff commands not registered by the hub (tp/heal/invsee/...) remain available on game pods; hosting them on the hub later is now a `plugin.yml` + two-line wiring change per host
feat: host network staff commands from wc-common; fly/invis on hub
All checks were successful
/ detect (pull_request) Successful in 5s
/ commit-check (pull_request) Successful in 6s
/ controller (pull_request) Has been skipped
/ chart (pull_request) Successful in 9s
/ plugin (pull_request) Successful in 2m7s
11edd936b0
Move the game-agnostic Bukkit admin commands (fly, invis, tp, heal, feed,
clearchat, lockchat, invsee, spectate, resetstats, setcoins, staff chat
relays) plus PermissionBridge, OnlinePlayerSource and StaffStateReceiver
from wc-mcsg into wc-common so every host plugin can register them.

- WcMcsgPlugin wires the shared classes against its GameScheduler and
  DbWriteExecutor; SG-only commands (gamestate, veto, lockchat/spectate)
  stay in wc-mcsg
- wc-hub now loads staff.yml via PermissionManager, registers
  PermissionBridge, applies persisted fly/invis on join through the
  shared StaffStateReceiver, and registers /fly and /invis; the hub
  deployment mounts the existing wc-mc-staff-config ConfigMap
- wc-velocity: drop the hub exclusions - staff state syncs to the hub on
  transfer and /staffreload refreshes the hub too; guard against store
  misses by syncing the default all-false state
- Tests move with the classes; velocity listener/reload tests updated
  for hub inclusion
- README documents hub-wide permissions, commands and state sync
crypt merged commit d6220871b0 into main 2026-10-03 17:40:30 +00:00
crypt deleted branch codex/wc-core-admin-commands 2026-10-03 17:40:30 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
crypt/k8s-mcsg-uhc!7
No description provided.