Commit graph

260 commits

Author SHA1 Message Date
zml
1e91273e0e Work towards making CommandMeta typesafe (#173)
Co-authored-by: Alexander Söderberg <sauilitired@gmail.com>
2020-12-18 19:49:57 +01:00
Alexander Söderberg
2f077e03f3 Improve injection 2020-12-18 19:49:57 +01:00
jmp
f8235a4ed1 ⬆️ Bump version to 1.3.0-SNAPSHOT 2020-12-18 19:49:57 +01:00
broccolai
2bdfc2777a Bump version to 1.3.0-dev 2020-12-18 19:49:57 +01:00
broccolai
d656c99601 Move all 1.2.0-SNAPSHOT references to 1.2.0 2020-12-07 20:05:45 +01:00
broccolai
237eda75ef Reformat project 2020-12-07 20:05:45 +01:00
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