Add staff command to give completed mage weapons - #42
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (8)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 SummarySummary by CodeRabbit
WalkthroughAdds ChangesStaff weapon give command
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant CommandSender
participant MagicCommand
participant WeaponGiveCommand
participant RecipientInventory
CommandSender->>MagicCommand: Invoke /magic weapon give
MagicCommand->>WeaponGiveCommand: Route command and arguments
WeaponGiveCommand->>WeaponGiveCommand: Validate arguments and prepare weapon
WeaponGiveCommand->>RecipientInventory: Check for an empty slot
WeaponGiveCommand->>RecipientInventory: Give prepared weapon
Suggested reviewers: Merge Risk: ⚪ Minimal · up to No actionable issue remains in the supplied review evidence. The change is mergeable after normal checks. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The new permission grants substantial weapon-spawning authority, but execution and completion consistently enforce it, and other administrative commands retain their existing checks. No introduced authorization bypass was established. Runtime integration and failure handling remain only partially verified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Comment |
Adds
/magic weapon give <player> <staff|wand|sword> <element> <aura> <part> [part...]to deliver a finished mage weapon with attunement and finalized sockets. The command validates enabled parts, archetype compatibility, required categories, positive tier-reaching aura and inventory space, and records zero crafting cost.give-permissiondefaults tomagic.weapon.giveand can use a custom staff node independently ofmagic.admin; blank disables spawning. Includes permission-aware completion and usage documentation.Validation: full unit suite plus targeted command tests pass; JaCoCo reports zero missed instructions, branches or lines and the configured coverage check passes. CI clean verify passed.
On TFMCDev01 (Paper 1.21.10 / Java 21), CI artifact DEV-20261004-0804 loaded successfully. In-game smoke checks passed permission denial, give permission without admin permission, invalid part rejection and delivery of Staff, Wand and Sword. Inspected item data includes attunement, locked sockets and zero-cost provenance. Test items and temporary permission grants were removed.