Skip to content

fix some commands sending to server#463

Open
thepoppetmaster1000 wants to merge 5 commits into19MisterX98:masterfrom
thepoppetmaster1000:commands
Open

fix some commands sending to server#463
thepoppetmaster1000 wants to merge 5 commits into19MisterX98:masterfrom
thepoppetmaster1000:commands

Conversation

@thepoppetmaster1000
Copy link
Copy Markdown

Note

fixes this issue: #459

some commands with subcommands typed without their required arguments were not being handled
by the mod builder, since cant found no executor on those nodes and
forwarded the input to the server
these commands were affected:

  • /seedcracker version
  • /seedcracker data
  • /seedcracker finder
  • /seedcracker finder type
  • /seedcracker finder category
  • /seedcracker render

solution:

  • Added a fallback in ClientCommand.register(): after build()
    is called, if builder has arguments but no executor, one is
    automatically injected using getUsage() and so the rest
    each affected command overrides getUsage() to provide a specific usage
    message to show
    -also FinderCommand needed its type and category nodes
    refactored out of loop so .executes() can be attached to the
    nodes themselves

this fits better with the actual code than my last pr

/seedcracker shows invalid command error

2026-05-01_04 48 20

the rest shows a especific message of usage

2026-05-01_04 48 39 2026-05-01_04 49 19

checks if arguments have executor set, otherwise injects fallback into .executes() using getUsage() method
- also add getUsageType() and getUsageCategory() methods
- refactor build() so type and category have own nodes which allows .executes() to be set on each node
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant