Commit Graph

611 Commits

Author SHA1 Message Date
Aikar 9e8c694eb4 Update JDA to latest 3.x release before we go to 4 2020-04-12 13:35:22 -04:00
Omer Oreg 0b717ba9c0 Made ShowCommandHelp constructors public
This makes it so you can throw the exception from outside the package.
2020-04-12 13:21:44 -04:00
nirewen 26b35b8309 Add Portuguese translations 2020-04-12 13:20:09 -04:00
portlek 3a3734730c turkish language support 2020-04-12 13:19:35 -04:00
Hasan Demirtaş 5953e6a99e toLowerCase method with Locale.ENGLISH parameter.
Fixes #255
2020-04-12 13:19:35 -04:00
William 'psyFi' Hatcher e2a1c454e5 Fixed typo
Sorry, it just really bugged me.
2020-04-06 10:36:53 -04:00
Tim Hagemann 2ba6895e0c Specifically ignore annotations in java package for meta-annotations
There's no world in which a java annotation contains one of the
command annotations and may only lead to infinite recursion.
2020-04-06 10:36:31 -04:00
Tim Hagemann 667dfec904 Support simple meta-annotations
This adds basic support for meta-annotations for commands and
parameters and allows users to create their own custom annotations
combining certain existing annotations and values. For example, a user
 can now define their own `CustomAnnotation` which combines a
condition and a flag:

```java
@Conditions("conditionname:confitionconfig")
@Flags("flagconfig=flagvalue")
public @interface CustomAnnotation {}
```
(Necessary `@Retention` and `@Target` ignore for brevity)
And use it just like they would normally.

This works by recursively going through the annotations, instead of
just looking at the root level. The reason most existing annotations
had to be touched is for them to be allowed on other annotations as
most of them were restricted to method or fields.

Currently there's no limit on nesting because if the user wants to
nest it to obscure levels - so be it. We could decide to limit this at
 some point to prevent users from shooting themselves in the foot if
that's necessary.

`@Dependency` and was specifically ignored as I don't think it makes
sense for that to be supported in this use case.

Relates to: #89
2020-04-06 10:36:31 -04:00
JOO200 eb7064f7c4 Exception handling: Handle CompletionException like ExecutionException 2020-04-06 10:34:49 -04:00
Aikar f2f37a3954 (DEPLOYED ACF) Updated JavaDocs 2019-11-17 11:29:08 -05:00
Joo200 34a60b920a Fix wrong output for default context resolver for numbers. 2019-11-17 11:27:43 -05:00
Franklin Mathieu 3701822f04 i18n,fr: fix garbled diacritics. (#240)
I suspect e9857cb8 changed encoding for the file and messed up
diacritics.

Also fixed a slight typo on acf-core.help_no_results.
2019-09-04 17:30:33 -05:00
Glare ab53b7b4e5 Added in loading from YAML files to bungee (#238) 2019-08-19 07:31:53 -05:00
MalzSmith 82c431426d Added hungarian language (#236) 2019-08-19 07:16:17 -05:00
Marek Šipoš 1cf2769c18 Update czech translation (#235)
* Update czech translation

Fixed some stuff, added missing entry, added czech diacritics

* Update czech translation (core)

Fixed some stuff, added missing entries, added czech diacritics
2019-08-17 01:13:30 -05:00
Matt 01350efe89 Translated vanish confirm section. (#233)
Also changed some sentences slightly to sound better in the Portuguese language.
2019-08-17 01:12:55 -05:00
chickeneer 8a5bdeea86 Merge pull request #227 from MrIvanPlays/bg-language
Changes to some of the bulgarian translations
2019-08-17 01:11:55 -05:00
Artyom Popov b05a6195f0 More improvements in Russian translation (#213) 2019-08-17 01:11:11 -05:00
chickeneer 586afc6193 Set locale field to be accessible - GH-234 2019-08-14 11:11:24 -05:00
chickeneer ec4816fe1b Fix Index out of bound error in completions for no parameter commands 2019-08-06 21:28:47 -05:00
MrIvanPlays 6dff5e12de Changes to some of the bulgarian translations 2019-07-24 10:17:50 +03:00
chickeneer 91e7b9d39b Eliminate all length requirements for username lengths GH-226 2019-07-22 18:33:16 -05:00
chickeneer 4b9bab652e Reduce required length of player names GH-226 2019-07-22 17:59:26 -05:00
JOO200 d17055eb99 Use getter for command conditions (#225) 2019-07-08 17:16:18 -05:00
egg82 96e5414b12 Updated Velocity to latest (#216)
* Updated Velocity to latest

Kyori text is the only breaking change, here.

* Updated Velocity scope
2019-06-21 19:41:15 -04:00
chickeneer 625171b206 Fix an infinite loop issue on server shutdown
Related to GH-215
2019-06-17 16:09:47 -05:00
Niklas Eicker b175f092d8 resolves #214 (#215) 2019-06-07 01:25:08 -05:00
chickeneer 7292c50f4a Do not filter out valid completion arguments
Fixes a bug introduced by PR 200. The bug related to the Values annotation which uses this getCompletionValues method also.

This is definitely not the propersolution. The underlying issue is
related to the logic calling `args` which is the original argument
array. And it should not be using arguments which have been resolved in
a previous parameter.
I was not able to find a quick/simple way to accommodate that issue.
2019-06-05 11:20:10 -05:00
JanTuck 4880a02371 Fix memory leak in unregister command (#208)
Fixes #198
2019-04-15 10:15:58 -04:00
Aikar 7893ebd198 (DEPLOYED ACF) Updated JavaDocs 2019-04-07 09:46:30 -04:00
MrIvanPlays 280e2f0da3 Make InvalidCommandArgument a runtime exception 2019-04-03 08:08:49 +03:00
Aikar 8a7157865c (DEPLOYED ACF) Updated JavaDocs 2019-04-01 17:39:00 -04:00
Aikar 4cc8d5a9e8 Fix help page count 2019-04-01 17:38:23 -04:00
Aikar 4aef08f587 also check for null 2019-03-31 18:57:44 -04:00
Aikar 1be6a0b3cb check for null 2019-03-31 18:56:29 -04:00
Aikar 18eba457ab (DEPLOYED ACF) Updated JavaDocs 2019-03-31 13:01:29 -04:00
JOO200 7583dc8810 Add support for CompletableFuture exception. (#206)
This PR adds support for exceptions in CompletableFuture in Commands.

Usage: Just return a CompletableFuture. ACF will catch the exceptionally stuff.
```java
public CompletableFuture<Void> futuredExecution(Player player) {
    return CompletableFuture.failedFuture(new InvalidCommandArgument("Failed in future.", false));
}
```
2019-03-31 13:00:24 -04:00
MrIvanPlays 3416c2e7ad Add bulgarian language (#204) 2019-03-28 13:26:04 -04:00
Aikar 73ceec7b59 (DEPLOYED ACF) Updated JavaDocs 2019-03-26 18:01:04 -04:00
Aikar 07d5fa671c Fix some bugs with RegisteredCommand 2019-03-26 17:58:02 -04:00
Aikar 8f58676213 (DEPLOYED ACF) Updated JavaDocs 2019-03-24 10:25:14 -04:00
JOO200 72d45739c9 Add support for multi word tab completion (#200)
I added support for multi word tab completion.

Current problem:
the replacement "example" contains completions with whitespaces
```java
@CommandCompletion("@example")
public void test(Player player, String takesTheRest) {...}
```
"takesTheRest" takes all the whole rest howewer the tab completion only supports one word.

I don't use the ACFUtils much and maybe there are some ugly checks, feel free to refactor.
2019-03-24 09:43:43 -04:00
Aikar 63e7ed6287 Try to work around travis CA Cert issue by force updating it 2019-03-23 12:33:38 -04:00
Aikar b3823ac2f0 Let's try oracle jdk since travis has issues with openjdk 2019-03-23 12:24:10 -04:00
Aikar 8b3f4d077e Update Travis JDK versions 2019-03-23 12:05:07 -04:00
Jeremy Wood 1c056cea45 Added basic JUnit5 testing framework. (#202) 2019-03-23 12:01:49 -04:00
Aikar 2577fe1844 (DEPLOYED ACF) Updated JavaDocs 2019-03-15 19:25:54 -04:00
Aikar 5a35fa25fc Handle future use of computePermissions to recalculate all children
Not used atm but while its fresh on mind....
2019-03-15 19:24:47 -04:00
Aikar 42867fe194 compute BaseCommand permissions before RegisteredCommands
Need to be computed for inheritance
2019-03-15 19:18:47 -04:00
Aikar 4e9fce55dd (DEPLOYED ACF) Updated JavaDocs 2019-03-15 01:49:10 -04:00