feat: port dev-only /tfmc tutorial, parrot and worldboss commands - #30
Conversation
These were the last /tfmc subcommands still handled by ConditionalEvents triggers on TFMCDev01. They are content under construction, so each section in tfmc.yml ships disabled and stays hidden from the command tree until enabled. - /tfmc tutorial <name> clear runs the tutorial's clear commands with a 10 s cooldown (was /tfmc <name> clear; nothing referenced it) - /tfmc parrot disguises the player and lets them fly briefly; the old trigger left their fly speed at 0.1 for good. Flight settings are now restored when it expires, on /tfmc unparrot (which never worked) and when the player leaves, with slow falling if they are airborne - /tfmc worldboss info shows the world-boss explainer Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (7)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe pull request adds configurable tutorial clearing and world-boss information commands. It also adds timed parrot flight, restores prior flight settings when sessions end, and cleans up sessions on player quit or plugin shutdown. ChangesDevelopment commands
Timed parrot flight
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant Player
participant TfmcCommand
participant TfmcActions
participant BukkitTfmcActions
participant BukkitScheduler
Player->>TfmcCommand: Request parrot flight
TfmcCommand->>TfmcActions: startFlight(player, speed)
TfmcActions->>BukkitTfmcActions: Start flight and save prior settings
BukkitTfmcActions-->>TfmcCommand: Return FlightState
TfmcCommand->>TfmcActions: later(ticks, expiry task)
TfmcActions->>BukkitTfmcActions: Schedule delayed task
BukkitTfmcActions->>BukkitScheduler: Schedule expiry
BukkitScheduler->>TfmcCommand: Run expiry task
TfmcCommand->>TfmcActions: endFlight(player, previous)
Merge Risk: ⚪ Minimal · up to No identified issue needs correction before merge. The tutorial cooldown and automatic parrot-flight expiry behave as intended. Security Architecture ReviewSecurity architecture risk: 🟡 Moderate · up to The new commands are disabled by default, and their normal permission and cleanup paths are bounded. On a server that enables parrot flight, however, a failed start or cleanup could leave a player’s temporary flight settings in place. The effective server configuration and failure behavior have not been verified. Retained concerns
Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 18.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 50 functions across 6 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
A rabbit taps the parrot’s flight command. Comment |
Follow-up to #29. These were the last
/tfmcsubcommands still handled by ConditionalEvents, and they only existed on TFMCDev01. They're content still being built, so each newtfmc.ymlsection ships withenabled: falseand stays out of the command tree until it's turned on. On Main nothing changes; dev enables all three./tfmc tutorial <name> clear/tfmc <name> clear, 13 separate triggerstutorials.list. It runs that tutorial'sclearcommands, copied verbatim, with a 10 s cooldown per tutorial. Nothing referenced the old form./tfmc parrotfly/flyspeedfor 20 s, 5 min cooldown/tfmc unparrotparrotso ConditionalEvents ignored it, undefined action groups, typoundisguiseplaye/tfmc worldboss infoParrot fixes. The old trigger turned flight off after 20 s but never reset the fly speed, so every player who used it kept a speed of 0.1 afterwards. Now the previous flight settings are restored in each of these cases:
/tfmc unparrotIf the player is left airborne, they get 5 s of slow falling.
parrot.permissionsis empty, which means everyone can use it, matching the trigger. The brokenunparrotchecked for Ascended, which suggests it may have been meant as a donor perk.Carried over unchanged (worth checking). The fishing tutorial's clear still takes MMOItems
FISHING_RODS FISHING_ROD,shearsandpaper. The tutorial actually hands out CustomFishingfishing_rod,iron_hookandfish_bait.The tutorial "give items" lantern events and the world-boss ticket events stay in ConditionalEvents. They aren't commands.
Verification
mvn verify: 218 tests pass. The new tests cover:unparrotand logging out ending the flightclearevents,parrot.ymlandtfmc_bosshelpremoved from ConditionalEvents. Dev now has no/tfmctriggers left. It enabled with no warnings, the new subcommands parse from the console, andtcore reload tfmcworks. Nobody was online, so I couldn't test parrot flight in game.🤖 Generated with Claude Code
Summary by CodeRabbit