Commit graph

94 commits

Author SHA1 Message Date
Alexander Söderberg
2572b73c4b feat(bukkit/paper): add root command deletion support (#371) 2022-06-18 22:52:58 -07:00
zml
63f2c9299f fabric: Support 1.19 (#356)
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
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
Alexander Söderberg
74fd40f403 feat(annotations): add @CommandMethod annotation processing (#366)
We now verify the following at compile time:
- That `@CommandMethod` annotated methods are non-static (error)
- That `@CommandMethod` annotated methods are public (warning)
- That the `@CommandMethod` syntax and specified `@Argument`s match
- That no optional argument precedes a required argument
2022-06-18 22:52:58 -07:00
Alexander Söderberg
f1582fb64e feat(annotations): add command containers (#364)
This is the first part of the introduction of annotation processing to cloud. A new `@CommandContainer` annotation has been introduced, which can be placed on classes to have the annotation parser automatically construct & parse the classes when `AnnotationParser.parseContainers()` is invoked.

A future PR will introduce another processor that will scan for `@CommandMethod` annotations and verify the integrity of the annotated methods (visibility, argument annotations, etc.).
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
4ffd077165 chore: update CHANGELOG.md 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
40b51676fe feat(minecraft): support sender-aware description decorators (#354) 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
Aldin
cc7793925d Register missing regex failure caption (#351) 2022-06-18 22:52:58 -07:00
Jason Penilla
d7182807de
Update changelog 2022-02-28 14:03:07 -07:00
Jason Penilla
0623bcb050 Update changelog 2022-02-28 13:57:35 -07:00
Jason Penilla
c4b77b3190 update changelog 2021-12-18 04:12:42 -08:00
Jason Penilla
f175ef8005 Update changelog 2021-12-02 02:04:43 -08:00
Jason
3f0ef5715c cloud-kotlin-coroutines (#318)
* Builder coroutine support

* Move coroutines to version catalog

* Add kdocs

* Add note about simple coordinator

* Update changelog
2021-12-02 02:04:43 -08:00
Jason Penilla
762de3dfba Update changelog 2021-12-02 02:04:43 -08:00
Alexander Söderberg
ad80933a20 Feature: Allow argument names to be inferred from parameter names 2021-12-02 02:04:43 -08:00
Jason
3df3560d91 annotations: Also apply builder modifiers from class (#303) 2021-12-02 02:04:43 -08:00
Jason Penilla
6cd1105642 Update changelog 2021-12-02 02:04:43 -08:00
Jake Potrebic
9f0ff4e504 core: fix And/OrPermission losing conditional tree (#296) 2021-12-02 02:04:43 -08:00
Jason Penilla
00bb3f79cd Update changelog 2021-12-02 02:04:43 -08:00
Jake Potrebic
ffac750f0d paper: Add KeyedWorldArgument (#293) 2021-12-02 02:04:43 -08:00
Frank van der Heijden
3e28cc3191 Add @since and CHANGELOG.md entry for flag permissions 2021-12-02 02:04:43 -08:00
Alexander Söderberg
5934c2fd3b Add changelog 2021-12-02 02:04:43 -08:00
Jason Penilla
5cc7fdd634 Update changelog 2021-07-05 02:56:06 -07:00
broccolai
e5f55145b1 Update changelog 2021-07-05 02:56:06 -07:00
Jason
7da05da323 bukkit: Implement ItemStack and Block predicate arguments (#259) 2021-07-05 02:56:06 -07:00
Jason
e3cc7d43cb bukkit: Implement ItemStackArgument (#257)
Fully featured on 1.13+, falls back to Material parser on legacy versions.

Also some general cleanup to the Bukkit impl
2021-07-05 02:56:06 -07:00
p5nbTgip0r
dd811bd157 Update changelog for long parser 2021-07-05 02:56:06 -07:00
broccolai
a6eb44376c Fix tuple#toArray implementations 2021-07-05 02:56:06 -07:00
broccolai
213039fc20 Update changelog 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
Alexander Söderberg
d9122d47d0
📚 Update CHANGELOG.md 2021-01-16 09:59:38 +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
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
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
jmp
2068b5a43c update changelog 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
Alexander Söderberg
83edf839e3 :docs: Add missing stuff to changelog 2020-12-18 19:49:57 +01:00
Alexander Söderberg
c281c49edf 🚀 Prepare for release 2020-12-18 19:49:57 +01:00
Alexander Söderberg
9ed40a698a Allow interception of command builders based on annotations in AnnotationParser
Fixes #179
2020-12-18 19:49:57 +01:00
Alexander Söderberg
e5a35afb8a Add @Parser annotated methods
Fixes #166. Also fixes #180.
2020-12-18 19:49:57 +01:00
Alexander Söderberg
885cc7e005 🎨 Fix formatting 2020-12-18 19:49:57 +01:00