Commit graph

308 commits

Author SHA1 Message Date
Jason Penilla
a0c80582d3 Improve string parser supplier argument checking 2023-09-09 00:17:56 -07:00
Pablo Herrera
1d3f1d3a56 Fix last argument always being treated as greedy in suggestions (#428) 2023-02-21 21:10:24 -07:00
Jason
6fe744f33c Improve doc on ParameterInjectorRegistry#registerInjector (#423) 2023-02-21 21:10:24 -07:00
Jason Penilla
22ed9aef9b Fix deprecated method use in new test 2022-12-13 11:13:00 -07:00
Pablo Herrera
bde084c14b Allow greedy parsers to suggest after a space (#414) 2022-12-13 11:13:00 -07:00
Jason
99d388b708 Deprecate argument newBuilder methods and add builder methods to align with newer arguments (#419) 2022-12-13 11:13:00 -07:00
Jason
306a1def9a Add helper to get root index help topic (#415) 2022-12-13 11:13:00 -07:00
zml
59c5a8310c build: update build-time dependencies, address new warnings (#413)
* build: update build-time dependencies, address new warnings

* build: switch to central repo declaration, remove redundant repositories

* build: use spotless predeclaration, more task avoidance on kotlin modules
2022-12-13 11:13:00 -07:00
Jason Penilla
0f4ad5d16a Fix flag nodes not having their parent set 2022-12-13 11:13:00 -07:00
Jason Penilla
4d96aa4b5f Update test 2022-12-13 11:13:00 -07:00
Jason
eca81f7372 Improve FilteringCommandSuggestionProcessor and adjust default filters (#410) 2022-12-13 11:13:00 -07:00
Pablo Herrera
6c026f994b Add option to allow flags anywhere after last literal argument (#395) 2022-12-13 11:13:00 -07:00
Pasqual Koschmieder
72f105014a fix invalid suggestions when parsing of argument fails (#401) 2022-12-13 11:13:00 -07:00
Jason
b19ec931cb Add Command.Builder#apply (#409) 2022-12-13 11:13:00 -07:00
Jason
1694df732d Improve nullability annotations on generics in CommandContext (#405) 2022-12-13 11:13:00 -07:00
Jason
025dc974ad Remove from command collection on unregister (#408) 2022-12-13 11:13:00 -07:00
Jason Penilla
ead52ef3aa Javadoc and SelectorUtils cleanup 2022-12-13 11:13:00 -07:00
Jason Penilla
c9d0040596 Update license 2022-12-13 11:13:00 -07:00
Pablo Herrera
ed1b3dc0c7 Fix parameter injection default predicate (#403) 2022-12-13 11:13:00 -07:00
Pablo Herrera
c36cf6b937 Make injection order predictable (#402) 2022-12-13 11:13:00 -07:00
Pasqual Koschmieder
09a66cef95 expose failure reason when flag parsing fails (#380) 2022-12-13 11:13:00 -07:00
Pasqual Koschmieder
7c934eccc7 fix root command unregister (#389) 2022-08-26 11:49:37 -07:00
Alexander Söderberg
ec535dad7f feat(core): add repeatable flags (#378)
implements #209.
2022-06-18 22:52:58 -07:00
Alexander Söderberg
296539d56c chore(core): deprecate prefixed accessors/mutators in CommandManager (#377)
chore(core): deprecate prefixed accessors/mutators in CommandManager.java

All prefixed (actual) getters/setters in CommandManager have been deprecated, and non-prefixed alternatives have been introduced. I've also put some effort into improving the JavaDocs of these methods.
2022-06-18 22:52:58 -07:00
Citymonstret
89ec3fbf29 chore: make code style consistent 2022-06-18 22:52:58 -07:00
Alexander Söderberg
2572b73c4b feat(bukkit/paper): add root command deletion support (#371) 2022-06-18 22:52:58 -07:00
Alexander Söderberg
28ff5d3003 feat(core): support root command deletion & standardize capabilities (#369) 2022-06-18 22:52:58 -07:00
Brian
08a97b2c4f fix: make BooleanArgument suggestions lowercase (#336) 2022-06-18 22:52:58 -07:00
Brian
f0e9b80c77 docs: fix typos (#344) 2022-06-18 22:52:58 -07:00
Alexander Söderberg
4360847852 chore(core): add apiguardian @API annotations (#368) 2022-06-18 22:52:58 -07:00
Alexander Söderberg
d4ab593460 feat(core): flag yielding arguments (#367)
Implements https://github.com/Incendo/cloud/issues/218
Also confirmed to fix https://github.com/Incendo/cloud/issues/321.

Both `StringArgument` and `StringArrayArgument` now have flag-yielding modes. For annotated command method users, this can be activated using ´@FlagYielding`
2022-06-18 22:52:58 -07:00
Citymonstret
e889811380 chore(core): add @This annotations 2022-06-18 22:52:58 -07:00
Alexander Söderberg
d613fd0208 feat(core): add MulticastDelegateFutureCommandExecutionHandler (#363)
This PR also adds a `handler()` getter to the command builder class. This will allow for things along the line of https://github.com/Incendo/cloud/issues/189 to be achieved.
2022-06-18 22:52:58 -07:00
Citymonstret
c39e0517fa chore: add test for issue #281
cannot replicate the issue (anymore).
2022-06-18 22:52:58 -07:00
Citymonstret
0ee576657b chore: add tests for issue #262
Add tests in order to try to replicate #262. The issue cannot be replicated.
2022-06-18 22:52:58 -07:00
Alexander Söderberg
09044b9c1b feat(core): add unit tests for the standard parsers (#362)
* feat(core): add BooleanParser unit tests

* feat(core): add ByteParser unit tests

* feat(core): add IntegerParser, LongParser & ShortParser unit tests

* feat(core): add EnumParser unit tests

* feat(core): add CharacterParser unit tests

* feat(core): add DoubleParser & FloatParser unit tests

* feat(core): add UUIDParser & StringArrayParser unit tests
2022-06-18 22:52:58 -07:00
Alexander Söderberg
46a3f7129f build: add revapi to core api modules (#361)
this way we can detect API/ABI breaks between versions. it'll compare to the previous tag.
2022-06-18 22:52:58 -07:00
Citymonstret
ebb25e9d41 chore(core): improve (some) tests 2022-06-18 22:52:58 -07:00
Alexander Söderberg
f3e95070ce fix: #337 NPE thrown on empty command tree (#358)
Fixes #337 by making an empty command three throw NoSuchCommandException instead of NullPointerException.
2022-06-18 22:52:58 -07:00
Aldin
2277bf5ef8 feat: allow a custom CaptionVariableReplacementHandler (#352) 2022-06-18 22:52:58 -07:00
Alexander Söderberg
d681ba5840 feat: annotation string processors (#353)
adds a system for processing strings found in annotations before they're used by AnnotationParser

implements #347

Also, because we're using "-Werror", the code won't actually build (and thus tests won't work) using JDK18. To remedy this, a bunch of @SuppressWarnings("serial")s has been added to the exceptions. We don't serialize exceptions, and they're in fact non-serializable because of their members, so this is the appropriate solution (well, the better solution would be to make them serializable, but that's outside the scope of this PR).
2022-06-18 22:52:58 -07:00
zml
ed7b7569a8 build: switch to spotless (#355)
* build: switch to spotless

add in some other basic formatting steps that allow for easy
auto-correction

* build: lint text files as well

* chore: remove license headers from package-info files

spotless can't verify these
2022-06-18 22:52:58 -07:00
Aldin
cc7793925d Register missing regex failure caption (#351) 2022-06-18 22:52:58 -07:00
Jason Penilla
eae247954f build and publishing updates 2022-06-18 22:52:58 -07:00
Jason Penilla
b0289e8d01 DurationArgument cleanup 2022-06-18 22:52:58 -07:00
Aldin
c58248e35d Register the duration argument parser in the default parser registry (#333) 2022-06-18 22:52:58 -07:00
Tadhg Boyle
c2b3145d4d Add DurationArgument for parsing java.time.Duration (#330)
Co-authored-by: Frank van der Heijden <frank.boekanier@gmail.com>
2022-06-18 22:52:58 -07:00
Jason Penilla
c26fbcb6fc Fix incorrect inputQueue usage in some argument types 2022-02-28 13:57:35 -07:00
Jason Penilla
18fc685c70 Don't remove from queue on failure in quoted string parser 2021-12-18 04:12:42 -08:00
Irmo van den Berge
484c97ca98 Fix concurrent cause of execution exception not being wrapped right
Signed-off-by: Irmo van den Berge <irmo.vandenberge@ziggo.nl>
2021-12-18 04:12:42 -08:00