Commit Graph

78 Commits

Author SHA1 Message Date
simpleauthority 0e221915c8 Unregister Commands on PluginDisableEvent (#22)
* Add CommandManager#unregisterCommand(BaseCommand), CommandManager#unregisterCommands(), and CommandManager#getCommandByAlias(String) + implementations

* Add to knownCommands upon registration

* allSuccess was not the right comparison to check

* Add a built-in listener to BukkitCommandManager to listen for plugin disable, so as to unregister commands automatically.

* Fix unregistration, because Bukkit is weird. Also ensure we iterate all the BaseCommand's Commands.

* Stop abusing AtomicBoolean, use BitSet instead!

* Switch to more standard way of checking allSuccess

* Didn't see the cool shorthand, changed

* Remove pom change

* Remove unused imports

* Unnecessary to set the first index of that array
2017-04-30 23:12:58 -04:00
Aikar bcd3cb8367 add min/max str length flags 2017-04-30 19:19:07 -04:00
Aikar bfd07bee94 add new multi config system for completions and add chat colors filter 2017-04-30 18:36:49 -04:00
Aikar 30f8332af0 use yellow colors 2017-04-30 17:33:13 -04:00
Aikar b49598bf75 many fixes for color stuff 2017-04-30 17:30:37 -04:00
Aikar b38adbd6b0 limit to colors only 2017-04-30 17:10:22 -04:00
Aikar 675dd053d9 add chat colors command completion 2017-04-30 17:07:21 -04:00
Aikar 479a5fb424 support @foo|@bar for command completions 2017-04-30 15:07:18 -04:00
Aikar 9ff6bcd9c9 support = as well as : for command completion configs 2017-04-30 11:03:19 -04:00
Aikar 0af1de6f3e support @Optional on OnlinePlayer 2017-04-29 21:23:54 -04:00
Aikar f127cc874f Improve Command Completions! 2017-04-29 21:15:00 -04:00
Aikar d6562ab1b3 misc cleanup 2017-04-29 20:44:57 -04:00
Aikar f4c60727ca bump version 2017-04-29 00:47:37 -04:00
Aikar 60785ec00a some fixes with reporting of errors 2017-04-29 00:45:24 -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
Aikar b593038a61 Use reflection to get the command map to support CraftBukkit/Spigot
Sadly what I thought would work, didn't.
2017-04-22 17:28:09 -04:00
Aikar 1341f291ce update readme 2017-04-21 23:16:04 -04:00
Aikar 25d726e113 Change group/artifact id and bump to 0.3.0-SNAPSHOT 2017-04-21 23:14:53 -04:00
Aikar 55ffa1da38 rename command.seevanish to acf.seevanish - fixes #15 2017-04-21 23:10:50 -04:00
Aikar 4ac62d4065 Rename stuff to ACF and expose util- Fixes #14 2017-04-21 23:10:04 -04:00
Aikar ea14d121d5 Use reflection to set name if setName doesnt exists, Fixes #16 2017-04-21 21:00:17 -04:00
Aikar 9793c7e8ae make itemheld flag support older MC versions 2017-04-21 20:34:53 -04:00
Aikar 536c6a874e reduce visibility of original input fields, expose as getters 2017-04-21 20:09:34 -04:00
Aikar f37aaef381 fix bug with default method with params 2017-04-21 19:58:48 -04:00
Aikar 085724983e print proper stack trace on caught exception 2017-04-21 19:33:43 -04:00
Aikar 767cf2751d rename completionConfig > config 2017-04-21 19:21:31 -04:00
Aikar d10d3fabf7 allow returning null for completion handlers 2017-04-21 19:11:23 -04:00
Aikar 2fb3a160de Create Paper stubs for completions/contexts
This is so others can extend these, and auto get anything added in future
2017-04-21 19:03:12 -04:00
Aikar 7a862f3f67 Add some getters 2017-04-21 18:54:41 -04:00
Aikar 2e5252c72f always return playes for @players completion 2017-04-21 18:40:08 -04:00
Aikar a9009457ec Fix example plugin 2017-04-21 18:34:46 -04:00
Aikar 5aa2437395 forgot something 2017-04-21 18:10:40 -04:00
Aikar 3ff29b1c10 Add some bukkit completions, misc stuff 2017-04-21 18:10:02 -04:00
Aikar 9dfec4bca0 ignore __default for tab complete 2017-04-21 14:53:07 -04:00
Aikar ee95ad9286 remove dep reduced pom accidentally commited 2017-04-21 02:21:17 -04:00
Aikar 887c79e602 add compiler args to example plugin 2017-04-21 02:05:11 -04:00
Aikar 8bb172ee26 Misc cleanup 2017-04-21 01:42:00 -04:00
Aikar c202931a44 Update readme version for beta and declare group/artifact ID's 2017-04-21 01:29:27 -04:00
Aikar ac10ff2bf4 add relocation to example plugin 2017-04-21 01:28:34 -04:00
Aikar c0a29c4691 Add an example plugin 2017-04-21 01:12:15 -04:00
Aikar 6fb261dc4c Fix bug with manager not being set on RC 2017-04-21 01:12:00 -04:00
Aikar 08dc4a444d Rename group/artifact and bump to 0.2.0 2017-04-21 00:24:22 -04:00
Daniel Ennis 7c85701da3 Merge pull request #12 from simpleauthority/ACF-class-patch
Make ACF#createManager(...) static.
2017-04-19 00:42:48 -04:00
Simple Authority ba9a92fb79 Make ACF#createManager(...) static. 2017-04-18 21:40:12 -07:00
Aikar 58d48aac16 initialize the logger 2017-04-19 00:29:16 -04:00
Aikar f675b8485e misc delombok cleanup
we had delomboked our project, resulting in unnecessary and ugly code, that got carried over
2017-04-19 00:26:50 -04:00
Aikar 0580e8f36a Re-add blank constructor for BaseCommand 2017-04-19 00:23:27 -04:00
Aikar 8c7dace1ad Add beta version info and api breakage warning 2017-04-18 21:40:47 -04:00
Aikar d7fa36cb38 Update README about beta testing 2017-04-18 21:39:46 -04:00
Aikar 1c5c04846c Remove need for plugin on base command, improve timing impl 2017-04-18 21:38:32 -04:00