Commit Graph

57 Commits

Author SHA1 Message Date
chickeneer 3c9ee804f2 Start development on a 0.6.0 version of acf
Nothing implemented/changed yet
2022-09-21 20:54:52 -05:00
Alberto Migliorato 24d97bb3eb Added Velocity 3.0.x support 2021-09-13 16:28:54 +02:00
MiniDigger 9452873d13 Add initial brigadier support (implements #77) (#153)
Co-authored-by: Aikar <aikar@aikar.co>
2020-08-13 20:40:06 -04:00
Dragonium 9188892e3b Fixed the typo(?) from SomeCommand.Test.TestInner#onTest1 (#281) 2020-08-13 18:36:25 -04:00
Aikar 1eddc2cb8b Clean up build scripts and rework shading/relocation
ACF deps such as timings lib and expiring map will now properly
be relocated into ACF.

This will avoid version conflicts with ExpiringMap and TimingsLib

Sadly, because locales is an exposed API, we can not relocate locales...

It will still be on plugins to add the locales relocation themselves.
Will update wiki to document this.

also updated maven plugins to newest versions, minus surefire, as
3.0 doesn't work with current setup. Went to latest 2.x there.

Got rid of a lot of duplicated shade configuration stuff across
submodules too.
2020-04-26 17:43:08 -04:00
William 'psyFi' Hatcher e2a1c454e5 Fixed typo
Sorry, it just really bugged me.
2020-04-06 10:36:53 -04:00
Aikar 42867fe194 compute BaseCommand permissions before RegisteredCommands
Need to be computed for inheritance
2019-03-15 19:18:47 -04:00
Aikar 9c1521a456 Implement Bukkit Description for /help 2019-03-14 23:18:41 -04:00
Aikar 4e103adca4 Add Proper support for Default Completion Handlers 2019-03-14 22:34:56 -04:00
Aikar 67d631d47c Move to an improved CommandRouter, improve routing logic
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
2019-02-25 21:45:12 -05:00
Aikar 975eb22afd add more test scenarios 2019-02-24 14:36:27 -05:00
Aikar 17d89ad216 More work towards relocating OnlinePlayer context
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.
2019-02-23 21:23:35 -05:00
Aikar a44d711996 Add more example stuff 2019-02-21 18:16:30 -05:00
Aikar 3fa9fdca65 add acf-example to project, switch to paper 2019-02-02 11:20:30 -05:00
Gabik21MC e181a2fabe fix compilation of example plugin (#154) 2018-07-24 17:41:08 -04:00
Osip Fatkullin 3c979a9ef2 Drop trivial Guava usages (#142)
#120, #127
2018-07-19 19:43:17 -04:00
Aikar d57dbcefab Update Maven Plugins, hopefully will fix #129 2018-05-27 12:43:32 -04:00
MiniDigger 95fe4577be add a new annotation to hide commands from tabcompletion and help (#124)
* add a new annotation to hide commands from tabcompletion and help (implements #123)

* do the annotation lookup once
2018-04-20 11:28:22 -04:00
MiniDigger cebe28ef6c [WIP] Add dependency injection functionality, Closes #85 (#86)
* 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
2018-01-25 14:21:16 -05:00
Aikar 1739bfc39c Add way to set @Flags context for entire command - Closes #29
Couldn't do it through annotations due to limitations on annotations,
but this achieves same goal.
2018-01-14 19:48:25 -05:00
Aikar 9f7eb9bcf5 Condition handlers wasnt meant to return boolean.
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.
2018-01-10 19:44:26 -05:00
Aikar 40eaa9ea07 Command Conditions and MANY other code changes for Generics <3🌮
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.
2018-01-08 23:30:27 -05:00
Aikar 9ef0ac6e5e Current progress on Conditions, not done yet - #58 2017-12-13 23:12:31 -05:00
Aikar fbed6f2be3 Add Support for Async Tab Completions for Paper Servers
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.
2017-11-30 01:18:43 -05:00
Aikar 8c49ecabcf Add many comments to the example to help explain things 2017-10-11 20:47:10 -04:00
Aikar b2b7b18cb1 Remove the .iml files to make kashike happy. 2017-08-23 20:23:51 -04:00
Aikar 11dcf57113 Work on the help system to start work on pagination and search 2017-08-23 19:16:45 -04:00
Aikar 4963db24b7 Update for the latest locales signature changes 2017-07-17 22:34:11 -04:00
Aikar c62c0298a2 Fix JB annotation deps 2017-07-03 22:56:02 -05:00
Aikar 08558d7538 go back to auto language scanning 2017-07-03 15:40:21 -05:00
Aikar 8168122241 Massive i18n work, not fully finished set but resolves #53 2017-06-30 12:05:00 -05:00
Aikar c9acb55a48 ton more I18N/Locales work, messages migrated! 2017-06-29 00:36:59 -04:00
Aikar c3b3a5f43a Move Locale API's to the external Locales artifact/project 2017-06-28 22:44:15 -04:00
Aikar f2e96ea244 Start of I18N work 2017-06-26 23:03:18 -04:00
Aikar 3a4ebe2d45 MC Timing upgrade, fix timing integrations, add parent timing 2017-06-24 01:23:22 -04:00
MiniDigger eb84340f46 Add custom Exception Handlers (#43)
* 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
2017-06-15 10:25:25 -04:00
Aikar 15b149d55c Big Break: Change the Command Completion Handler signature to match Context
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.
2017-06-14 22:17:33 -04:00
Aikar 1455dd4951 get rid of BaseSubcommand and establish parent tree 2017-06-08 00:07:53 -04:00
Aikar 7bf24e9c13 Almost done with modular work 2017-06-03 00:11:43 -04:00
Aikar 0bf2621a91 Merge branch 'master' into modular
* master:
  Warn if you register replacements after commands
  add some more example
  Fix Command Replacements not being applied correctly to aliases - fixes #37
2017-05-20 12:29:04 -04:00
Aikar e79912299f add some more example 2017-05-20 12:22:56 -04:00
Aikar c2a58a471f Refactor everything to a modular format - WIP
This does not compile

Almost done with core !!!
2017-05-20 11:32:41 -04:00
Aikar 2e0c034224 Move core code into a core folder in prep for bukkit extraction 2017-05-17 00:45:18 -04:00
Aikar 9f08f16028 Add support for Command Replacements - Resolves #28 2017-05-05 23:44:32 -04:00
Aikar 80fa47685f supper inner classes and parent up subcommand bases - Resolves #20 2017-05-05 21:57:15 -04:00
Aikar 4160e8be23 Allow multiple class files registering to same root alias - resolves #17
allows organizing categories of commands (staff etc)
2017-05-04 23:36:47 -04:00
Aikar 3a1b1264a1 Update MC timings for new class name 2017-05-02 22:38:09 -04:00
Aikar d6ff2d59a2 go back down to 0.4.0, theres no way someone was using that API 2017-05-02 22:06:44 -04:00
Aikar e41d4e507c v.0.5.0: Move Timings Impl to external lib, resolve Timings v2 Paper 1.8 support
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
2017-05-02 21:41:38 -04:00
Aikar ae87e7440a v0.4.0: Refactor Command Completions to look up context - API BREAK
Just add ", c" to your registerCompletion handler:

commandManager.getCommandCompletions().registerCompletion("test", (sender, config, input, c) -> {

});
2017-04-29 00:30:48 -04:00