Repository navigation
feat: show ConditionalEvents /tfmc commands in the command tree - #52
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@coderabbitai review |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Summary
Merge Risk: ⚪ Minimal · up to
|
✅ Action performedReview finished.
|
TFMCCore owns the
/tfmcBrigadier tree, so a/tfmc ...command that only ConditionalEvents handles shows as an unknown command (red, no tab completion) in the client. When the CE event doesn't cancel the command, Core also rejects it after CE ran ("Incorrect argument for command").Add an opt-in
conditional-events.commandslist toTFMCCore/tfmc.yml. Each entry is a literal path after/tfmc(e.g.kit iron remove), optionally ending in<args>for free-form arguments (e.g.roll <args>). Core adds those paths to the tree with a no-op executor, so the client sees them and Core no longer errors. CE still runs the commands, conditions and cooldowns. Existing Core handlers and their permission checks stay as they are, and invalid paths are logged and skipped. The list is empty by default, so servers that don't set it (Main, Dev) are unchanged. The tree is built at startup, so list changes need a restart.This replaces draft #36 (closed), rebased on current main. Changes since #36: tests updated for #49 (
promoteinstead ofhelper promote), and a test for invalid paths to cover the warning branch under the 100% line-coverage gate.Validation:
mvn -B --no-transfer-progress clean verify: 809 tests, 0 failures, 0 uncovered lines./tfmc calendarran CE and then gave "Incorrect argument", androll 20 +2/masks clearerrored. With this build, the client's command tree hascalendar,kit iron remove,roll <args>andmasks clear,banstays hidden from a non-helper, all of those run without an error, and/tfmc map,/tfmc tipsand unknown subcommands behave as before.For TFMCTutorial01, which has about 70 CE-only
/tfmccommands (kits, rolls, calendar, professions, class).🤖 Generated with Claude Code