Commit Graph

572 Commits

Author SHA1 Message Date
Aikar 07d5fa671c Fix some bugs with RegisteredCommand 2019-03-26 17:58:02 -04:00
Aikar 8f58676213 (DEPLOYED ACF) Updated JavaDocs 2019-03-24 10:25:14 -04:00
JOO200 72d45739c9 Add support for multi word tab completion (#200)
I added support for multi word tab completion.

Current problem:
the replacement "example" contains completions with whitespaces
```java
@CommandCompletion("@example")
public void test(Player player, String takesTheRest) {...}
```
"takesTheRest" takes all the whole rest howewer the tab completion only supports one word.

I don't use the ACFUtils much and maybe there are some ugly checks, feel free to refactor.
2019-03-24 09:43:43 -04:00
Aikar 63e7ed6287 Try to work around travis CA Cert issue by force updating it 2019-03-23 12:33:38 -04:00
Aikar b3823ac2f0 Let's try oracle jdk since travis has issues with openjdk 2019-03-23 12:24:10 -04:00
Aikar 8b3f4d077e Update Travis JDK versions 2019-03-23 12:05:07 -04:00
Jeremy Wood 1c056cea45 Added basic JUnit5 testing framework. (#202) 2019-03-23 12:01:49 -04:00
Aikar 2577fe1844 (DEPLOYED ACF) Updated JavaDocs 2019-03-15 19:25:54 -04:00
Aikar 5a35fa25fc Handle future use of computePermissions to recalculate all children
Not used atm but while its fresh on mind....
2019-03-15 19:24:47 -04:00
Aikar 42867fe194 compute BaseCommand permissions before RegisteredCommands
Need to be computed for inheritance
2019-03-15 19:18:47 -04:00
Aikar 4e9fce55dd (DEPLOYED ACF) Updated JavaDocs 2019-03-15 01:49:10 -04:00
Aikar a0c4cd7a50 Register ACF help system into bukkit 2019-03-15 01:48:24 -04:00
Aikar 5e1565ab7d (DEPLOYED ACF) Updated JavaDocs 2019-03-14 23:19:06 -04:00
Aikar 9c1521a456 Implement Bukkit Description for /help 2019-03-14 23:18:41 -04:00
Aikar e9857cb8b3 Adjust default parameter help output 2019-03-14 23:07:37 -04:00
Aikar 655ab0b110 (DEPLOYED ACF) Updated JavaDocs 2019-03-14 22:43:33 -04:00
Aikar f6a8c68d80 Add Logger and FileConfiguration as default bukkit dependencies 2019-03-14 22:37:51 -04:00
Aikar 4e103adca4 Add Proper support for Default Completion Handlers 2019-03-14 22:34:56 -04:00
Aikar aa2e6ad1f8 Don't repeat last command completion unless its prefixed repeat 2019-03-12 21:52:50 -04:00
Aikar 23dd046b8e Improve parameter permissions and fix RC permission check 2019-03-09 11:27:58 -05:00
Kévin Jimenez d2754b99c9 Add support for CommandPermission annotation as parameter for permiss… (#197)
…ions by Optional annotation

In the past we could not handle a permission in relation to the presence of an optional argument, it forced us to manage it in the body of the command, and could be repetitive and boring, note that it also works with the annotation Default
2019-03-09 11:03:04 -05:00
Aikar d7477cb732 (DEPLOYED ACF) Updated JavaDocs 2019-03-03 11:12:51 -05:00
Aikar ced74bc5d3 Support private methods too on local class.
we stil inherit public methods as previous
2019-03-03 11:11:58 -05:00
Aikar 2d09149f2e (DEPLOYED ACF) Updated JavaDocs 2019-02-27 19:21:57 -05:00
JOO200 7670224d81 Set default help page to one. (#196)
Fix for empty helps with CommandManager#generateCommandHelp()
2019-02-27 17:40:15 -05:00
Aikar 57d541562d (DEPLOYED ACF) Updated JavaDocs 2019-02-25 23:01:03 -05:00
Aikar 1b799355c5 fix command completions for aliases too 2019-02-25 23:00:31 -05:00
Aikar 9cff04301f (DEPLOYED ACF) Updated JavaDocs 2019-02-25 22:47:25 -05:00
Aikar 6a7766e35d Fix command routing for forwarding commands
completions still funky, but least get execution working
2019-02-25 22:46:48 -05:00
Aikar 16ece3d102 (DEPLOYED ACF) Updated JavaDocs 2019-02-25 22:28:47 -05:00
Aikar 5d11925813 Fix NPE in help - Fixes #162 2019-02-25 22:27:03 -05:00
Aikar 4c29b44477 (DEPLOYED ACF) Updated JavaDocs 2019-02-25 21:46:25 -05: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 063bc2f0df (DEPLOYED ACF) Updated JavaDocs 2019-02-24 13:22:03 -05:00
Aikar 9032570ca2 Fix getFirstElement to not care if there is more than 1 2019-02-24 13:19:25 -05:00
Aikar ae9fa93c2a (DEPLOYED ACF) Updated JavaDocs 2019-02-23 22:33:00 -05:00
Aikar 4ef33613fc Do deep lookups on Private annotations
Added method to help do parent/enclosing based lookups
2019-02-23 22:32:05 -05:00
Aikar 115861be9a Fix Default handlers that consume input - #192 Fixed 2019-02-23 21:55:30 -05:00
Aikar a23ff21abf Improve code for scope lookup 2019-02-23 21:43:55 -05:00
JOO200 f235281112 Improve command handling from unknown commands (#195)
Currently there has to be the `@CatchUnknown` method in the same class as the `@Default` method.
Without finding any methods for handling unknown commands the default fallback method is the first registered or the class with `@Default` annotated method inside.

Maybe the solution to throw an exception for an unknown command is better.
The BaseCommand tries to execute the command context and if it's not possible it will throw an UnknownCommandException or smth like that.
2019-02-23 21:39:32 -05:00
Aikar 93f8c0ad84 add copyright plugin to required 2019-02-23 21:25:41 -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 5c1d446c19 Fix improper optional usage in velocity 2019-02-23 21:22:30 -05:00
Aikar 805e5a62ed Remove debug of minecraft version # 2019-02-23 17:35:44 -05:00
McLive f4a5d6f705 Move OnlinePlayer to own packages and deprecate at old locations (#194) 2019-02-23 17:35:37 -05:00
Aikar cadeacaf93 (DEPLOYED ACF) Updated JavaDocs 2019-02-21 19:17:08 -05:00
JOO200 f893e37c97 Added Method-Getter in RegisteredCommand class (#193)
I want to use own annotations for help implementations (link, tooltips, short description etc.)
I can't access the method directly for the annotations, please add the getter ;)
2019-02-21 19:14:58 -05:00
Aikar 59b4392de1 (DEPLOYED ACF) Updated JavaDocs 2019-02-21 18:29:11 -05:00
Aikar 7282dade69 fix arg limit on completion context lookup and remove debug 2019-02-21 18:28:21 -05:00