Commit graph

422 commits

Author SHA1 Message Date
Irmo van den Berge
9e48a41eab 🐛 Annotations API fix
Annotations API fix failure when a literal name matches an argument name (#143)
2020-12-07 20:05:45 +01:00
zml
013d2d61f4 Give CommandManager a registration state (#148)
* Make CommandManager track its availability for registration

This prevents situations where changes to the manager
would result in undefined state in other places.

* Add unsafe registration capability

* Very minor formatting + `@since` tags

* Add changes to changelog

Co-authored-by: Alexander Söderberg <sauilitired@gmail.com>
2020-12-07 20:05:45 +01:00
jmp
65684d0036 🎨 Add stacktrace click and hover events to the default minecraft-extras CommandExecutionException handler 2020-12-07 20:05:45 +01:00
jmp
2cfbdc8415 📦 Use the correct Sponge repo 2020-12-07 20:05:45 +01:00
jmp
62ba96ebeb 📦 Update minecraft-extras for adventure-api 4.2.0 2020-12-07 20:05:45 +01:00
Irmo van den Berge
1c7ebe0957 Fix junit test error when named suggestion provider runs before method construction
Parsing should occur in the @BeforeAll or this test fails sporadically

Signed-off-by: Irmo van den Berge <irmo.vandenberge@ziggo.nl>
2020-12-07 20:05:45 +01:00
Alexander Söderberg
d8f0b1a47e Allow passing a supplier to command context
This fixes #116
2020-12-07 20:05:45 +01:00
jmp
e9134efad6 Add more tests for ambiguous command registration
Also clean up after leaving the Command Tree in an invalid state during tests
2020-12-07 20:05:45 +01:00
jmp
7df6917fe4 Added CommandExecutionException which wraps any exception thrown during the execution of command handlers. Should be handled using CommandManager#registerExceptionHandler, similar to NoSuchCommandException, ArgumentParseException, etc. 2020-12-07 20:05:45 +01:00
jmp
2f0ded5be6 🐛 Fix registration of command aliases on Bukkit when using Brigadier 2020-12-07 20:05:45 +01:00
jmp
fc1a613463 Allow for use of named suggestion providers in @Flag annotated command method parameters, add methods to FlagContext to work with flag values as optionals 2020-12-07 20:05:45 +01:00
jmp
6d0301d9dd Specify UTF-8 for Javadocs too 2020-12-07 20:05:45 +01:00
jmp
d9735212a8 Specify UTF-8 encoding in build.gradle 2020-12-07 20:05:45 +01:00
jmp
dbdafed273 🐛 Fix Bukkit alias command suggestions without Brigadier 2020-12-07 20:05:45 +01:00
jmp
e6af4e6caa Add a method to get the failure reason of SelectorParseExceptions 2020-12-07 20:05:45 +01:00
jmp
a04e3f92cb Allow for use of a BiFunction<C, E, Component> instead of just a Function<E, Component> in MinecraftExceptionHandler 2020-12-07 20:05:45 +01:00
jmp
1193135b8e 📚 Update changelog 2020-12-07 20:05:45 +01:00
jmp
f1cc2689a0 Add a test for ambiguous command registration 2020-12-07 20:05:45 +01:00
jmp
5e27148d82 Throw AmbiguousNodeException for more ambiguous cases 2020-12-07 20:05:45 +01:00
jmp
829c310872 Add a method to CloudBrigadierManager to enable/disable native suggestions for argument types 2020-12-07 20:05:45 +01:00
jmp
9c9e13e8b8 Allow for use of @Completions annotation with argument types other than String 2020-12-07 20:05:45 +01:00
jmp
9a5c674f0d 🐛 Use the correct default values for Double and Float ranges in the StandardParserRegistry 2020-12-07 20:05:45 +01:00
jmp
118005978f Also expose the Brigadier manager from the VelocityCommandManager 2020-12-07 20:05:45 +01:00
Alexander Söderberg
d484b99fc4 Store the currently parsing argument in the command context
This fixes #101
2020-12-07 20:05:45 +01:00
Alexander Söderberg
c2065aabd1 Add parameter injectors (#104) 2020-12-07 20:05:45 +01:00
jmp
e4efffe577 📚 Update changelog 2020-12-07 20:05:45 +01:00
jmp
d0209dc762 Expose the Brigadier manager from Brigadier-enabled command managers 2020-12-07 20:05:45 +01:00
jmp
81e53ed454 🚀 Version bump 2020-12-07 20:05:45 +01:00
jmp
a264605cf0 Use a cropped png for the readme 2020-11-20 03:48:10 +00:00
Julian Staudt
c781d51282 It's a svg file 2020-11-20 03:48:10 +00:00
Julian Staudt
0da348a187 Not so spooky anymore :C 2020-11-20 03:48:10 +00:00
allenclan23
3c75361e38 Bump Velocity to latest 2020-10-28 16:43:50 +01:00
dependabot[bot]
0db6a68750 ⬆️ Bump JDA from 4.2.0_211 to 4.2.0_212
Bumps JDA from 4.2.0_211 to 4.2.0_212.

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-28 09:45:42 +01:00
dependabot[bot]
e55a9ca116 ⬆️ Bump slf4j-simple from 1.7.21 to 1.7.30
Bumps [slf4j-simple](https://github.com/qos-ch/slf4j) from 1.7.21 to 1.7.30.
- [Release notes](https://github.com/qos-ch/slf4j/releases)
- [Commits](https://github.com/qos-ch/slf4j/compare/v_1.7.21...v_1.7.30)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-27 13:40:33 +01:00
dependabot[bot]
24bfc1d961 ⬆️ Bump JDA from 4.2.0_209 to 4.2.0_211
Bumps JDA from 4.2.0_209 to 4.2.0_211.

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-26 08:53:12 +01:00
Alexander Söderberg
fdeaa7d8cc 📚 Update CHANGELOG to prepare for the release 2020-10-24 19:52:44 +02:00
Alexander Söderberg
2843b368d5 📚 Change version to 1.1.0 from 1.1.0-SNAPSHOT 2020-10-24 19:52:44 +02:00
Alexander Söderberg
a68bc0bea7 Allow for recursive annotations (#97)
Co-authored-by: Mariell <proximyst@proximyst.com>
2020-10-24 19:52:44 +02:00
jmp
e26d01388d Improve the exception message for LocationArgument 2020-10-24 19:52:44 +02:00
Alexander Söderberg
cfac2639ad Add errorprone and fix warnings/errors
The compiler will also treat all warnings as errors from now on.
2020-10-24 19:52:44 +02:00
jmp
6ffee9d04f Make changes from PR comments 2020-10-24 19:52:44 +02:00
Alexander Söderberg
9b80bb9eb7 🐛 Add missing build.gradle file 2020-10-24 19:52:44 +02:00
Alexander Söderberg
641a5f2683 📚 Add https://github.com/Incendo/bot to project list 2020-10-24 19:52:44 +02:00
Alexander Söderberg
63068ad75d 🐛 Pop input on correctly parsed PircBotX user 2020-10-24 19:52:44 +02:00
Alexander Söderberg
7c340f7a60 🚀 Bump PircBotX version 2020-10-24 19:52:44 +02:00
Alexander Söderberg
f0feaf4e13 Register a parser supplier for UserArgument 2020-10-24 19:52:44 +02:00
Alexander Söderberg
979d1079c6 Add a PircBotX implementation of cloud 2020-10-24 19:52:44 +02:00
jmp
c74ac64e5f 🐛 Fix optionals not being brig executors 2020-10-24 19:52:44 +02:00
jmp
c9d4f39612 Allow for class annotations as a default for when an annotation is not present on a method 2020-10-24 19:52:44 +02:00
Alexander Söderberg
d37f2236e7 📚 Add recent changes to CHANGELOG 2020-10-24 19:52:44 +02:00