feat(admin): add Leaf administration commands
This commit is contained in:
@@ -56,3 +56,11 @@
|
||||
- The exact expiration boundary and globally disabled behavior suppress reminders without resetting first-join state.
|
||||
- The default message names all player commands and explains automatic combat opt-out.
|
||||
- Verified repeated joins, expiration, global suppression, first-join retention, and the full build with `./gradlew clean check jar`.
|
||||
|
||||
### US-005 administration and US-003 identity completed
|
||||
|
||||
- Added the complete `leaf.admin` command tree for global state, live strength, player status, saved choice, and locks.
|
||||
- Runtime global and strength changes persist before activation and immediately reconcile all online players.
|
||||
- Target resolution prefers exact online/current names, retains prior names, accepts UUIDs, and rejects ambiguous reused names.
|
||||
- Added position-specific administrative autocomplete and mutation/no-change reporting with validation before mutation.
|
||||
- Verified global effect and prefix suppression/restoration, live strength, targets, locks, command permissions, completion, durable aliases, and the full build with `./gradlew clean check jar`.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
type: User Story
|
||||
title: "US-003: Identify protected players"
|
||||
description: Mark actively protected players with a visible leaf prefix wherever Spigot supports it.
|
||||
status: in-progress
|
||||
status: done
|
||||
---
|
||||
|
||||
# US-003: Identify protected players
|
||||
@@ -15,8 +15,8 @@ As a **server participant**, I want protected players to be visibly identified s
|
||||
- [x] An actively protected player has the same prefix before their overhead name where Spigot supports it.
|
||||
- [x] An actively protected player has the same prefix in standard Spigot chat where the active chat format supports it.
|
||||
- [x] The default prefix uses a leaf symbol with readable spacing and Minecraft-compatible formatting.
|
||||
- [ ] The prefix is removed immediately when the player opts out or is opted out by PvP or an administrator.
|
||||
- [ ] Prefixes are suppressed while Leaf is globally disabled and restored for online opted-in players when it is re-enabled.
|
||||
- [x] The prefix is removed immediately when the player opts out or is opted out by PvP or an administrator.
|
||||
- [x] Prefixes are suppressed while Leaf is globally disabled and restored for online opted-in players when it is re-enabled.
|
||||
- [x] Prefix updates do not overwrite unrelated display-name text where the Spigot API allows the values to coexist.
|
||||
- [x] Scoreboard-team and third-party chat-plugin compatibility limitations are documented, and unsupported integrations fail without affecting protection state.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
type: User Story
|
||||
title: "US-005: Administer Leaf"
|
||||
description: Give administrators command-based control over global and per-player Leaf behavior.
|
||||
status: backlog
|
||||
status: done
|
||||
---
|
||||
|
||||
# US-005: Administer Leaf
|
||||
@@ -11,19 +11,19 @@ As a **server administrator**, I want to control Leaf globally and per player so
|
||||
|
||||
## Acceptance criteria
|
||||
|
||||
- [ ] Administrative commands require `leaf.admin`, which server operators receive by default.
|
||||
- [ ] `/leaf enabled <on|off>` globally enables or disables Leaf.
|
||||
- [ ] Global disablement immediately suppresses Leaf-managed Resistance, prefixes, and onboarding reminders without erasing player opt-in choices.
|
||||
- [ ] Global enablement immediately restores protection and prefixes for eligible online opted-in players.
|
||||
- [ ] `/leaf player <name|uuid> status` reports the player's identity, saved opt-in choice, active-protection state, lock state, and first-join time.
|
||||
- [ ] `/leaf player <name|uuid> enabled <on|off>` changes the player's saved opt-in choice and immediately reconciles their online effect and prefix.
|
||||
- [ ] `/leaf player <name|uuid> locked <on|off>` controls whether that player can change their own saved choice.
|
||||
- [ ] A locked player receives a clear explanation when `/leaf on` or `/leaf off` is denied.
|
||||
- [ ] PvP-triggered opt-out remains authoritative even for a locked player.
|
||||
- [ ] Player targets resolve online names, previously known names, and UUIDs without confusing two players who used the same name.
|
||||
- [ ] `/leaf strength <1-5>` changes the live Resistance level and immediately updates protected online players.
|
||||
- [ ] Administrative autocomplete is permission-aware and suggests valid subcommands, known player targets, properties, levels, and `on` or `off` values for the current argument position.
|
||||
- [ ] Every successful mutation reports exactly what changed, and invalid requests make no partial changes.
|
||||
- [x] Administrative commands require `leaf.admin`, which server operators receive by default.
|
||||
- [x] `/leaf enabled <on|off>` globally enables or disables Leaf.
|
||||
- [x] Global disablement immediately suppresses Leaf-managed Resistance, prefixes, and onboarding reminders without erasing player opt-in choices.
|
||||
- [x] Global enablement immediately restores protection and prefixes for eligible online opted-in players.
|
||||
- [x] `/leaf player <name|uuid> status` reports the player's identity, saved opt-in choice, active-protection state, lock state, and first-join time.
|
||||
- [x] `/leaf player <name|uuid> enabled <on|off>` changes the player's saved opt-in choice and immediately reconciles their online effect and prefix.
|
||||
- [x] `/leaf player <name|uuid> locked <on|off>` controls whether that player can change their own saved choice.
|
||||
- [x] A locked player receives a clear explanation when `/leaf on` or `/leaf off` is denied.
|
||||
- [x] PvP-triggered opt-out remains authoritative even for a locked player.
|
||||
- [x] Player targets resolve online names, previously known names, and UUIDs without confusing two players who used the same name.
|
||||
- [x] `/leaf strength <1-5>` changes the live Resistance level and immediately updates protected online players.
|
||||
- [x] Administrative autocomplete is permission-aware and suggests valid subcommands, known player targets, properties, levels, and `on` or `off` values for the current argument position.
|
||||
- [x] Every successful mutation reports exactly what changed, and invalid requests make no partial changes.
|
||||
|
||||
## Related
|
||||
|
||||
|
||||
Reference in New Issue
Block a user