Commit graph

696 commits

Author SHA1 Message Date
jmp
956700b310 Remove unused imports 2021-07-05 02:56:06 -07:00
jmp
21fa35a9fc Bump version to 1.5.0-SNAPSHOT 2021-07-05 02:56:06 -07:00
jmp
58f49033ce Use Command instead of TabCompleteEvent on Bukkit 2021-07-05 02:56:06 -07:00
jmp
2cc72e2ff9 docs: Update snapshot repo link in docs 2021-05-03 21:17:52 -07:00
jmp
c76f296185 Update README with correct snapshot repo 2021-05-03 21:12:13 -07:00
Jason
7b441ec481 Use simpleCoordinator() in docs example
Replace `AsynchronousCommandExecutionCoordinator.newBuilder().build()` with `CommandExecutionCoordinator.simpleCoordinator()`. (`AsynchronousCommandExecutionCoordinator.newBuilder().build()` does not work as it's missing a generic type argument, needs to be `AsynchronousCommandExecutionCoordinator.<CommandSender>newBuilder().build()`)
2021-05-03 21:09:38 -07:00
dependabot[bot]
3960727b2a Bump com.github.ben-manes.versions from 0.36.0 to 0.38.0
Bumps com.github.ben-manes.versions from 0.36.0 to 0.38.0.

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-04 14:34:24 +01:00
dependabot[bot]
e0a1ec9c9f Bump jvm from 1.4.30 to 1.4.31
Bumps jvm from 1.4.30 to 1.4.31.

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-04 14:34:08 +01:00
dependabot[bot]
96c6b13c63 Bump jvm from 1.4.21-2 to 1.4.30
Bumps jvm from 1.4.21-2 to 1.4.30.

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-06 16:51:44 +01:00
Aurora
04270bef5b
Update README.adoc 2021-02-03 21:30:02 +01:00
Aurora
87a8bef895
Add files via upload 2021-02-03 21:24:29 +01:00
Aurora
85785ebe5a
Replace logo 2021-02-03 21:22:35 +01:00
Aurora
975d3e0e5d
New cloud logo epic poggers awesome 2021-02-03 21:21:47 +01:00
Alexander Söderberg
e77d5c8d78
Update README.adoc
Add information about injection points, suggestions and custom arguments.
2021-01-18 16:36:25 +01:00
Alexander Söderberg
42f5c643be
Update README.adoc
- Add flag section
- Add minecraft-extras section
- Add Bukkit/Paper sections
2021-01-17 22:45:01 +01:00
Zach Levis
753507cc3c build: Bump dependency versions 2021-01-17 09:43:45 +01:00
Zach Levis
98f389a72a build: Move to using Indra 2021-01-17 09:43:45 +01:00
Alexander Söderberg
6a100c9ca1
Update docs.yml
Only push documentation on push to master
2021-01-17 09:42:14 +01:00
Alexander Söderberg
414fa3f8b3
Specify some source highlighting options. 2021-01-17 01:15:57 +01:00
Alexander Söderberg
928d1b641f
Add a lot of documentation.
A lot of documentation has been added to the new Cloud documentation. This has primarily been focused on covering usage of annotations.
2021-01-17 01:09:00 +01:00
Alexander Söderberg
77b569d30a
Fix building failure due to license violations.
The HEADER file had not been updated to match the content of LICENSE.
2021-01-16 23:19:28 +01:00
Alexander Söderberg
d3642e3c7d
📚 Fix license and push tag 2021-01-16 10:06:08 +01:00
Alexander Söderberg
d9122d47d0
📚 Update CHANGELOG.md 2021-01-16 09:59:38 +01:00
Alexander Söderberg
1600ef16c3
:clock: 2021 let's go!!! 2021-01-16 09:58:46 +01:00
Alexander Söderberg
3454cbe4da 🚀 1.4.0 release 2021-01-16 08:54:07 +01:00
Zach Levis
7d46e64ed3 Add logical operators to permissions
These operators allow some basic combination of permissions to occur,
which expands what can be easily done with permissions definitions.
2021-01-16 08:54:07 +01:00
p5nbTgip0r
09f8dbd956 🐛 JDA: Fix webhook messages throwing NPE (#214)
* Fix NPE with webhook messages.

Webhook messages would be constructed as `JDAGuildSender`, which calls `Objects.requireNonNull(event.getMember())` however the JDA documentation states that the `getMember()` method will `be null in case of Message being received in a PrivateChannel or isWebhookMessage() returning true.` If the message is a webhook message, a generic `JDACommandSender` instance will be constructed instead of a `JDAGuildSender`

* Add webhook fix to changelog
2021-01-16 08:54:07 +01:00
zml
5dd925a8d1 sponge7: Implement basic command manager for SpongeAPI 7 (#212) 2021-01-16 08:54:07 +01:00
Alexander Söderberg
9550dce5e6 Add access to parameter annotations in the parameter injector 2021-01-16 08:54:07 +01:00
Alexander Söderberg
92f8661b59 📚 Make CHANGELOG less messy and add missing changes 2021-01-16 08:54:07 +01:00
Alexander Söderberg
14baf5b876 📚 Improve CommandSyntaxFormatter documentation 2021-01-16 08:54:07 +01:00
Alexander Söderberg
2cf743c805 Add injection services (#211)
*  Add injection services

* Change dependency scope for Guice
2021-01-16 08:54:07 +01:00
Alexander Söderberg
0b6a554946 Implement predicate permissions (#210)
Co-authored-by: Josh Taylor <me@broccol.ai>
2021-01-16 08:54:07 +01:00
Zach Levis
78b081ccc2 core: Allow attaching a default description to arguments 2021-01-16 08:54:07 +01:00
Zach Levis
b38c725dc5 core: Use the ArgumentDescription interface for descriptions
This allows minecraft-extras to provide an implementation that
uses Adventure chat components to represent the description.
2021-01-16 08:54:07 +01:00
jmp
fa16fc8ef2 Fix license plugin 2021-01-16 08:54:07 +01:00
Zach Levis
ef85fa9ee9 core: Add CommandFlag-accepting getters to FlagContext
This allows for type-safe access to the collection of available flags.
2021-01-16 08:54:07 +01:00
jmp
2068b5a43c update changelog 2021-01-16 08:54:07 +01:00
jmp
39b94a3df0 Add helper method for flags to MutableCommandBuilder 2021-01-16 08:54:07 +01:00
jmp
47d602fde1 Update Gradle to 6.8 2021-01-16 08:54:07 +01:00
Jason
7347ced0db Expose Command/Context from exceptions where possible (#204)
* Expose Command/Context from exceptions where possible

* Update changelog
2021-01-16 08:54:07 +01:00
zml
a6f8159410 Expand ability to use Adventure Components in exceptions and metadata (#200)
* cloud-minecraft: Support preserving component error messages

Any exception thrown by an argument parser that is a
ComponentMessageThrowable will now have its component message directly
queried.

* minecraft-extras: Add Component-based description handling for help

* Apply review comments
2021-01-16 08:54:07 +01:00
jmp
12f5c71504 Add missing inputQueue.remove() to TextColorArgument 2021-01-16 08:54:07 +01:00
Jason
fcae5b8637 Add Location2DArgument, mapped to NMS Vec2I (#201) 2021-01-16 08:54:07 +01:00
p5nbTgip0r
fe153f19c1 Adjust JDA example to provide MessageReceivedEvent in commandSender mappers.
This is necessary for the `ChannelArgument` parser to work.
2021-01-16 08:54:07 +01:00
p5nbTgip0r
2723ec13f9 JDA channel argument parsing improvements.
- Ensure that the parsing modes list cannot be empty when constructing `MessageParser`
- Don't proceed if the command context does not have the message event stored
- Don't proceed if the message was not sent in a guild
- Remove `|| modes.size() == 1` check in channel mention parsing
2021-01-16 08:54:07 +01:00
p5nbTgip0r
3a047c1ce0 Add more context keys to JDA preprocessor 2021-01-16 08:54:07 +01:00
p5nbTgip0r
a2796bee04 Fix JDA mentioned user argument parsing if a mention is not given.
If only `ParserMode.MENTION` was set as a parsing mode, the initial check for `input.endsWith(">")` would be bypassed and the input would begin to be parsed like a mention. If the input was less than three characters long then the `substring` calls would give a very ambiguous error along the lines of `begin 2, end X-1, length X`.

This commit fixes this issue by adding a check to make sure the input is an actual user mention. If the input isn't a mention then an exception will be set stating that the sender's input was not a user mention.

In addition, this commit also removes the `modes.size() == 1` check in the mention parser. I'm not sure why this was there to begin with, but I don't think that the input parsing check should be bypassed because only one parsing mode is specified. I settled on a check in the `UserParser` constructor to make sure that the parsing modes list isn't empty in order to ensure that at least one parser mode handles the input.
2021-01-16 08:54:07 +01:00
Alexander Söderberg
bb9bc4e579 Add keyed values to CommandContext and do some cleanup 2021-01-16 08:54:07 +01:00
Alexander Söderberg
9276a919d3 Add keyed values to CommandContext and do some cleanup 2021-01-16 08:54:07 +01:00