Commit graph

354 commits

Author SHA1 Message Date
jmp
01d36aecd8 🐛 Fix Commodore registration on Bukkit 2020-12-07 20:05:45 +01:00
jmp
77225274ce Improve Bukkit command registration logic
When a new command is registered, if a command with that name already exists, Bukkit will not register the new command, ie the existing command gets priority.
However, if the already existing command is an alias, it will replaced by the new command.

These changes update cloud to be aware whether or not an existing command is an alias, and that if so, that Bukkit will allow us to have priority for this command.
2020-12-07 20:05:45 +01:00
Alexander Söderberg
070a719165 Try to preserve command sender when getting Brigadier suggestions 2020-12-07 20:05:45 +01:00
jmp
ded94567c6 Add a ManagerSetting to override existing commands 2020-12-07 20:05:45 +01:00
jmp
544c344f18 📚 Update changelog
Also minor codestyle fixes
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
62ba96ebeb 📦 Update minecraft-extras for adventure-api 4.2.0 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
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
829c310872 Add a method to CloudBrigadierManager to enable/disable native suggestions for argument types 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
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
Alexander Söderberg
2843b368d5 📚 Change version to 1.1.0 from 1.1.0-SNAPSHOT 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
jmp
c74ac64e5f 🐛 Fix optionals not being brig executors 2020-10-24 19:52:44 +02:00
Alexander Söderberg
d6ccc1d59b 🧹 Clean up the gradle build scripts a little
Changes:
- Move all dependency versions to a shared file
- Order the projects in settings.gradle
2020-10-24 19:52:44 +02:00
jmp
37d4bdfe80 📚 Add missing @since annotations 2020-10-24 19:52:44 +02:00
jmp
7cb1661f42 Add BungeeCommandPreprocessor 2020-10-24 19:52:44 +02:00
allenclan23
f73b713658 Expand the bungee module 2020-10-24 19:52:44 +02:00
jmp
d86973f227 Add VelocityCommandPreprocessor 2020-10-24 19:52:44 +02:00
jmp
5ce9677cb4 Register new Velocity arguments with the parser registry 2020-10-24 19:52:44 +02:00
Alexander Söderberg
79aefb05b5 Add LocationArgument to cloud-bukkit (#63)
*  Add LocationArgument to cloud-bukkit

* 🎨 Use the Bukkit CommandSender from the command context in LocationArgument

* 🐛 Fixed quoted parsing in StringArgument

* 📚 Fix code style

Co-authored-by: jmp <jasonpenilla2@me.com>
2020-10-24 19:52:44 +02:00
Alexander Söderberg
1249b74e83 📚 Add since annotations to new classes 2020-10-24 19:52:44 +02:00
allenclan23
8d69767c15 Added ServerArgument to Velocity 2020-10-24 19:52:44 +02:00
jmp
c7c286eb7a Update TextColorArgument with captions 2020-10-24 19:52:44 +02:00
jmp
fba29041e6 🎨 Add caption for string "No input was provided" 2020-10-24 19:52:44 +02:00
jmp
c67cc35cf6 🎨 Add captions for Bukkit entity selector arguments 2020-10-24 19:52:44 +02:00
Alexander Söderberg
366c4f2ce5 Add an adventure text colour parser 2020-10-24 19:52:44 +02:00
Alexander Söderberg
edc5249244 Improve the velocity module 2020-10-24 19:52:44 +02:00
Alexander Söderberg
9761c0fadf 🚀 Version bump. 2020-10-24 19:52:44 +02:00
jmp
bc0cc6fa4b 🔖 Bump version to 1.0.2 2020-10-19 10:03:56 +02:00
jmp
3125e49632 📦 Bump adventure-api to 4.1.1 2020-10-19 10:03:56 +02:00
Alexander Söderberg
d6cdeca1c3 📚 Improve the Bukkit and PaperCommandManager documentation 2020-10-17 19:03:52 +02:00
allenclan23
4de9946683 Fix an issue created by breaking changes in Velocity. CommandSource#sendMessage now requires an Identity 2020-10-16 08:00:01 +02:00
jmp
6f0940ebd4
📦 Update minecraft-extras for Adventure 4.0.0 2020-10-14 12:11:25 +02:00
Alexander Söderberg
79bb017fd3
🔖 Version bump 2020-10-14 12:11:19 +02:00
Alexander Söderberg
f669e93be5
🚀 Version bump. 2020-10-14 01:34:32 +02:00
Alexander Söderberg
06a34651bf
🐛 Fix brigadier suggestion building
An offset will be added pointing to the last occurrence of a blank space. This fixes incorrect tab completions for greedy strings
2020-10-13 19:53:01 +02:00
jmp
5f466fcbc0 Fix parsing of flag arguments that start with '-', i.e. a negative integer, add captions for flag argument 2020-10-13 15:07:40 +02:00
jmp
2fbd90dfee 🐛 Register permissions with Bukkit so commands aren't suggested to players without permission when Brigadier is not used 2020-10-12 13:33:07 -07:00