now supports splitting commands over multiple BaseCommands better
should now only match probable @Default handlers, so @CatchUnknown
can still work in obviously wrong scenarios.
@HelpCommand no longer implies @Default as @CatchUnknown will pick it up
This context was conflicting with each other over multiple
ACF modules, so if someone wanted to use multiple ACF's in same jar,
it would clash and not work.
The PR to move these was incomplete and this finishes fixing the
context handlers to support new and old.
* misc improvements (as suggested by intellij)
* first draft of the DI functionality (#85)
* address review
* reenabled disabled inspections
* overload registerDependency method
* inject fields of superclasses two and remove invalid sponge default dependency
Sorry if anyone wrote one already, remove the return type please.
Really don't want to bump version when very low chance anyones using
this system yet.
This completes and fully enables a new feature called "Conditions"
We already had some forms of conditions built into @Flags such as
on the Player for itemheld.
However, letting end users add additional restrictions to existing context
handlers such as players is not possible without redefining the context.
That's not friendly nor scalable.
Flags will now be primarily only for controlling how to resolve a context,
and then Conditions will then be the way to validate the context and trigger
a failure if the condition is not met.
Conditions can be placed on Command Class, Methods, or individual Parameters.
This adds the ability for plugins to define completion handlers as async safe (not on games main thread)
When they are defined async safe, and ran on a Paper 1.12.2+ server, with a Paper ACF manager,
completions will be handled mostly async, letting you safely do heavier operations in tab completions.
* Add the ability to register exception handlers to handle exceptions that occur while executing a command
* you saw nothing
* add ability to cancel default error message
* per command exception handler
* add a getter for the default exception handler
For consistency, make Completion Handlers be implemented the same way Context Handlers are.
Previously when we added the Context parameter, we left the original signature in place and simply tacked , c on the end.
This made migration easier than changing all completion handlers bodies.
But since 0.5.0 is a big migration already, let's just get it over with.
See changes to Bukkit default completions and the example plugin for migration example.
* master:
Warn if you register replacements after commands
add some more example
Fix Command Replacements not being applied correctly to aliases - fixes#37
This likely wouldn't of broke anyones code, only if they used the Timings method
in ACFUtil, but bumping just to be 'good' since it is an API break.
If you did not use the Timings in ACFUtil, then you can just bump the version
without breakages.
Timings is now handled over at https://github.com/aikar/minecraft-timings
Just add ", c" to your registerCompletion handler:
commandManager.getCommandCompletions().registerCompletion("test", (sender, config, input, c) -> {
});