Skip to content

Commit 5e1b22c

Browse files
authored
Merge pull request CommandAPI#550 from JorelAli/release/9.4.0
Release/9.4.0
2 parents a7d2717 + e44e212 commit 5e1b22c

File tree

1,213 files changed

+69424
-8225
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,213 files changed

+69424
-8225
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ indent_style = space
99

1010
[commandapi-documentation-code/**{.java,.kt}]
1111
indent_style = space
12+
13+
[commandapi-documentation-velocity-code/**{.java,.kt}]
14+
indent_style = space

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ body:
2020
description: What version of Minecraft are you using? _(If using a minor version that isn't specified, such as 1.18.1, just select the latest version below it such as 1.18)_
2121
multiple: false
2222
options:
23+
- "1.20.5"
2324
- "1.20.4"
2425
- "1.20.3"
2526
- "1.20.2"

.github/workflows/build.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
matrix:
1616
# Use these Java versions
1717
java: [
18-
17, # Current Java LTS & minimum supported by Minecraft
18+
21, # Current Java LTS & minimum supported by Minecraft
1919
]
2020
# and run on both Linux and Windows
2121
# os: [ubuntu-20.04, windows-2022]
@@ -29,7 +29,7 @@ jobs:
2929
uses: actions/checkout@v3
3030

3131
- name: Setup JDK ${{ matrix.java }}
32-
uses: actions/setup-java@v3
32+
uses: actions/setup-java@v4
3333
with:
3434
distribution: temurin
3535
java-version: ${{ matrix.java }}
@@ -131,7 +131,7 @@ jobs:
131131
### Upload .jar artifacts ###
132132

133133
- name: Upload CommandAPI (Bukkit) plugin artifact
134-
if: ${{ runner.os == 'Linux' && matrix.java == '17' }} # Only upload artifacts built from latest java on one OS
134+
if: ${{ runner.os == 'Linux' && matrix.java == '21' }} # Only upload artifacts built from latest java on one OS
135135
uses: actions/upload-artifact@v3
136136
with:
137137
name: CommandAPI (Bukkit plugin)
@@ -141,7 +141,7 @@ jobs:
141141
!commandapi-platforms/commandapi-bukkit/commandapi-bukkit-plugin/target/*javadoc.jar
142142
143143
- name: Upload CommandAPI (Velocity) plugin artifact
144-
if: ${{ runner.os == 'Linux' && matrix.java == '17' }} # Only upload artifacts built from latest java on one OS
144+
if: ${{ runner.os == 'Linux' && matrix.java == '21' }} # Only upload artifacts built from latest java on one OS
145145
uses: actions/upload-artifact@v3
146146
with:
147147
name: CommandAPI (Velocity plugin)
@@ -157,10 +157,10 @@ jobs:
157157

158158
### Save PR information for 'SonarAnalyze'
159159
- name: Save PR number to file
160-
if: github.event_name == 'pull_request' && ${{ matrix.os }} == 'ubuntu-latest' && ${{ matrix.java_version }} == '17'
160+
if: github.event_name == 'pull_request' && ${{ matrix.os }} == 'ubuntu-latest' && ${{ matrix.java_version }} == '21'
161161
run: echo ${{ github.event.number }} > PR_NUMBER.txt
162162
- name: Archive PR number
163-
if: github.event_name == 'pull_request' && ${{ matrix.os }} == 'ubuntu-latest' && ${{ matrix.java_version }} == '17'
163+
if: github.event_name == 'pull_request' && ${{ matrix.os }} == 'ubuntu-latest' && ${{ matrix.java_version }} == '21'
164164
uses: actions/upload-artifact@v3
165165
with:
166166
name: PR_NUMBER
@@ -175,14 +175,14 @@ jobs:
175175
- name: Checkout the CommandAPI repository
176176
uses: actions/checkout@v3
177177

178-
- name: Setup JDK 17
179-
uses: actions/setup-java@v3
178+
- name: Setup JDK 21
179+
uses: actions/setup-java@v4
180180
with:
181181
distribution: temurin
182182
server-id: ossrh # Needs to match the id in the main pom.xml file
183183
server-username: MAVEN_USERNAME
184184
server-password: MAVEN_PASSWORD
185-
java-version: 17
185+
java-version: 21
186186
cache: maven
187187

188188
- name: Deploy snapshot version of the CommandAPI (Bukkit+Velocity) to the Sonatype snapshot repository

.github/workflows/sonar.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ jobs:
6666
echo "PR targets $branchTarget"
6767
echo "sonar.branch.target=$branchTarget" >> $GITHUB_ENV
6868
69-
- name: Setup JDK 17
70-
uses: actions/setup-java@v3
69+
- name: Setup JDK 21
70+
uses: actions/setup-java@v4
7171
with:
7272
distribution: temurin
73-
java-version: 17
73+
java-version: 21
7474
cache: maven
7575

7676
- name: Cache SonarCloud packages

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ build
1515
docssrc/src/.markdownlint-cli2.yaml
1616
.gradle
1717
*.versionsBackup
18+
dependency-reduced-pom.xml

Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = CommandAPI
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER = 9.3.0
41+
PROJECT_NUMBER = 9.4.0
4242

4343
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4444
# for a project that appears at the top of each page and should give viewer a

README.md

Lines changed: 44 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -49,24 +49,25 @@ The list of what version of the CommandAPI you'll need to run on a specific vers
4949
| **1.14.1, 1.14.2** | v2.0 - 5.12, 8.3.0 - 8.8.0 | 8.8.0 | 16 |
5050
| **1.14.3, 1.14.4** | v2.1 - 5.12, 8.3.0 - 8.8.0 | 8.8.0 | 16 |
5151
| **1.15.x** | v2.3a - 5.12, 8.3.0 - 9.3.0 | 9.3.0 | 16 |
52-
| **1.16.1** | v3.0 - 5.12, 8.3.0 - 9.3.0 | 9.3.0 | 16 |
53-
| **1.16.2** | v4.0 - 5.12, 8.3.0 - 9.3.0 | 9.3.0 | 16 |
54-
| **1.16.3** | v4.2 - 5.12, 8.3.0 - 9.3.0 | 9.3.0 | 16 |
55-
| **1.16.4** | v5.2 - 5.12, 8.3.0 - 9.3.0 | 9.3.0 | 16 |
56-
| **1.16.5** | v5.7 - 7.0.0, 8.3.0 - 9.3.0 | 9.3.0 | 16 |
57-
| **1.17** | 6.0.x - 9.3.0 | 9.3.0 | 16 |
58-
| **1.17.1** | 6.1.x - 9.3.0 | 9.3.0 | 16 |
59-
| **1.18, 1.18.1** | 6.5.2 - 9.3.0 | 9.3.0 | 16 |
60-
| **1.18.2** | 6.5.4 - 9.3.0 | 9.3.0 | 16 |
61-
| **1.19** | 8.3.0 - 9.3.0 | 9.3.0 | 16 |
62-
| **1.19.1** | 8.5.0 - 9.3.0 | 9.3.0 | 16 |
63-
| **1.19.2** | 8.5.1 - 9.3.0 | 9.3.0 | 16 |
64-
| **1.19.3** | 8.7.0 - 9.3.0 | 9.3.0 | 16 |
65-
| **1.19.4** | 8.8.0 - 9.3.0 | 9.3.0 | 16 |
66-
| **1.20** | 9.0.2 - 9.3.0 | 9.3.0 | 16 |
67-
| **1.20.1** | 9.0.3 - 9.3.0 | 9.3.0 | 16 |
68-
| **1.20.2** | 9.2.0 - 9.3.0 | 9.3.0 | 16 |
69-
| **1.20.3, 1.20.4** | 9.3.0 | 9.3.0 | 16 |
52+
| **1.16.1** | v3.0 - 5.12, 8.3.0 - 9.4.0 | 9.4.0 | 16 |
53+
| **1.16.2** | v4.0 - 5.12, 8.3.0 - 9.4.0 | 9.4.0 | 16 |
54+
| **1.16.3** | v4.2 - 5.12, 8.3.0 - 9.4.0 | 9.4.0 | 16 |
55+
| **1.16.4** | v5.2 - 5.12, 8.3.0 - 9.4.0 | 9.4.0 | 16 |
56+
| **1.16.5** | v5.7 - 7.0.0, 8.3.0 - 9.4.0 | 9.4.0 | 16 |
57+
| **1.17** | 6.0.x - 9.4.0 | 9.4.0 | 16 |
58+
| **1.17.1** | 6.1.x - 9.4.0 | 9.4.0 | 16 |
59+
| **1.18, 1.18.1** | 6.5.2 - 9.4.0 | 9.4.0 | 16 |
60+
| **1.18.2** | 6.5.4 - 9.4.0 | 9.4.0 | 16 |
61+
| **1.19** | 8.3.0 - 9.4.0 | 9.4.0 | 16 |
62+
| **1.19.1** | 8.5.0 - 9.4.0 | 9.4.0 | 16 |
63+
| **1.19.2** | 8.5.1 - 9.4.0 | 9.4.0 | 16 |
64+
| **1.19.3** | 8.7.0 - 9.4.0 | 9.4.0 | 16 |
65+
| **1.19.4** | 8.8.0 - 9.4.0 | 9.4.0 | 16 |
66+
| **1.20** | 9.0.2 - 9.4.0 | 9.4.0 | 16 |
67+
| **1.20.1** | 9.0.3 - 9.4.0 | 9.4.0 | 16 |
68+
| **1.20.2** | 9.2.0 - 9.4.0 | 9.4.0 | 16 |
69+
| **1.20.3, 1.20.4** | 9.3.0 - 9.4.0 | 9.4.0 | 16 |
70+
| **1.20.5, 1.20.6** | 9.4.0 | 9.4.0 | 16 |
7071

7172
-----
7273

@@ -379,7 +380,7 @@ The resulting compiled documentation is found in `docs/X.X.X`, where `X.X.X` is
379380
380381
## CommandAPI Project Timeline
381382
382-
This is the current roadmap for the CommandAPI (as of 11th May 2023):
383+
This is the current roadmap for the CommandAPI (as of 30th April 2024):
383384
384385
- **10.0.0:**
385386
@@ -414,6 +415,30 @@ This is the current roadmap for the CommandAPI (as of 11th May 2023):
414415
</tr>
415416
</thead>
416417
<tbody>
418+
<tr>
419+
<td valign="top"><b>9.4.0</b></td>
420+
<td valign="top">April 2024</td>
421+
<td valign="top">
422+
<b>CommandAPI Changes:</b>
423+
<ul>
424+
<li>https://github.com/JorelAli/CommandAPI/issues/495 Adds a parameter to <code>EntitySelectorArgument</code> to allow failure when no entity lists are empty</li>
425+
<li>https://github.com/JorelAli/CommandAPI/issues/367, https://github.com/JorelAli/CommandAPI/pull/509 Adds the ability to register commands with a custom namespace</li>
426+
<li>https://github.com/JorelAli/CommandAPI/pull/523 Exposed more details of the <code>CommandPermission</code></li>
427+
<li>https://github.com/JorelAli/CommandAPI/issues/536, https://github.com/JorelAli/CommandAPI/pull/537 Fixes <code>MultiLiteralArgument</code> help displaying the node name instead of the literal text</li>
428+
<li>Fixed implementation issues with <code>FunctionArgument</code></li>
429+
<li>https://github.com/JorelAli/CommandAPI/issues/490 Adds (experimental) support for Mojang-mapped servers via the CommandAPI config</li>
430+
<li>https://github.com/JorelAli/CommandAPI/issues/524 Fixes <code>CommandAPIBukkit.get().getTags()</code> erroring in 1.20.4</li>
431+
<li>https://github.com/JorelAli/CommandAPI/pull/540 Add methods to "safe-cast" arguments to <code>CommandArguments</code></li>
432+
<li>https://github.com/JorelAli/CommandAPI/pull/541 Adds support for a <code>NamespacedKey</code> variant for the <code>PotionEffectArgument</code></li>
433+
</ul>
434+
<b>Minecraft Version Changes:</b>
435+
<ul>
436+
<li>Drops support for version 1.15.x</li>
437+
<li>Adds support for version 1.20.5</li>
438+
<li>Adds support for version 1.20.6</li>
439+
</ul>
440+
</td>
441+
</tr>
417442
<tr>
418443
<td valign="top"><b>9.3.0</b></td>
419444
<td valign="top">December 2023</td>

commandapi-annotations/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<parent>
1919
<groupId>dev.jorel</groupId>
2020
<artifactId>commandapi</artifactId>
21-
<version>9.3.0</version>
21+
<version>9.4.0</version>
2222
</parent>
2323

2424
<artifactId>commandapi-annotations</artifactId>

commandapi-annotations/src/main/java/dev/jorel/commandapi/annotations/Annotations.java

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,13 @@ private SortedSet<String> calculateImports(Element classElement) {
183183
for(VariableElement parameter : method.getParameters()) {
184184
Annotation argument = getArgument(parameter);
185185
if(argument != null) {
186-
imports.addAll(Arrays.asList(getPrimitive(argument).value()));
186+
187+
if (argument instanceof ANBTCompoundArgument) {
188+
// Get NBTCompoundArgument type from type mirror
189+
imports.add(parameter.asType().toString());
190+
} else {
191+
imports.addAll(Arrays.asList(getPrimitive(argument).value()));
192+
}
187193

188194
if(argument.annotationType().getEnclosingClass() == null) {
189195
// Normal arguments
@@ -299,8 +305,12 @@ private <T extends Annotation> Map<Integer, String> emitArgumentsAndGenerateArgu
299305

300306
// Handle return types
301307
Primitive primitive = getPrimitive(argumentAnnotation);
302-
if(primitive.value().length == 1) {
303-
argumentMapping.put(i - 1, primitive.value()[0]);
308+
if (argumentAnnotation instanceof ANBTCompoundArgument) {
309+
argumentMapping.put(i - 1, parameter.asType().toString());
310+
} else {
311+
if(primitive.value().length == 1) {
312+
argumentMapping.put(i - 1, primitive.value()[0]);
313+
}
304314
}
305315
}
306316

commandapi-annotations/src/main/java/dev/jorel/commandapi/annotations/arguments/ANBTCompoundArgument.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
/**
3131
* Annotation equivalent of the {@link NBTCompoundArgument}
3232
*/
33-
@Primitive("dev.jorel.commandapi.nbtapi.NBTContainer")
33+
@Primitive({})
3434
@Retention(RetentionPolicy.SOURCE)
3535
@Target(ElementType.PARAMETER)
3636
public @interface ANBTCompoundArgument {

0 commit comments

Comments
 (0)