Skip to content

Commit e39fab8

Browse files
authored
Merge pull request CommandAPI#609 from JorelAli/release/9.6.0
Release/9.6.0
2 parents aacd957 + 0546c4f commit e39fab8

File tree

1,117 files changed

+60332
-4682
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,117 files changed

+60332
-4682
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ 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.21.3"
24+
- "1.21.2"
25+
- "1.21.1"
2326
- "1.21"
2427
- "1.20.6"
2528
- "1.20.5"

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.5.3
41+
PROJECT_NUMBER = 9.6.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: 33 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -53,23 +53,24 @@ The list of what version of the CommandAPI you'll need to run on a specific vers
5353
| **1.16.2** | v4.0 - 5.12, 8.3.0 - 9.4.2 | 9.4.2 | 16 |
5454
| **1.16.3** | v4.2 - 5.12, 8.3.0 - 9.4.2 | 9.4.2 | 16 |
5555
| **1.16.4** | v5.2 - 5.12, 8.3.0 - 9.4.2 | 9.4.2 | 16 |
56-
| **1.16.5** | v5.7 - 7.0.0, 8.3.0 - 9.5.3 | 9.5.3 | 16 |
57-
| **1.17** | 6.0.x - 9.5.3 | 9.5.3 | 16 |
58-
| **1.17.1** | 6.1.x - 9.5.3 | 9.5.3 | 16 |
59-
| **1.18, 1.18.1** | 6.5.2 - 9.5.3 | 9.5.3 | 16 |
60-
| **1.18.2** | 6.5.4 - 9.5.3 | 9.5.3 | 16 |
61-
| **1.19** | 8.3.0 - 9.5.3 | 9.5.3 | 16 |
62-
| **1.19.1** | 8.5.0 - 9.5.3 | 9.5.3 | 16 |
63-
| **1.19.2** | 8.5.1 - 9.5.3 | 9.5.3 | 16 |
64-
| **1.19.3** | 8.7.0 - 9.5.3 | 9.5.3 | 16 |
65-
| **1.19.4** | 8.8.0 - 9.5.3 | 9.5.3 | 16 |
66-
| **1.20** | 9.0.2 - 9.5.3 | 9.5.3 | 16 |
67-
| **1.20.1** | 9.0.3 - 9.5.3 | 9.5.3 | 16 |
68-
| **1.20.2** | 9.2.0 - 9.5.3 | 9.5.3 | 16 |
69-
| **1.20.3, 1.20.4** | 9.3.0 - 9.5.3 | 9.5.3 | 16 |
70-
| **1.20.5, 1.20.6** | 9.4.0 - 9.5.3 | 9.5.3 | 16 |
71-
| **1.21** | 9.5.0 - 9.5.3 | 9.5.3 | 16 |
72-
| **1.21.1** | 9.5.2 - 9.5.3 | 9.5.3 | 16 |
56+
| **1.16.5** | v5.7 - 7.0.0, 8.3.0 - 9.6.0 | 9.6.0 | 16 |
57+
| **1.17** | 6.0.x - 9.6.0 | 9.6.0 | 16 |
58+
| **1.17.1** | 6.1.x - 9.6.0 | 9.6.0 | 16 |
59+
| **1.18, 1.18.1** | 6.5.2 - 9.6.0 | 9.6.0 | 16 |
60+
| **1.18.2** | 6.5.4 - 9.6.0 | 9.6.0 | 16 |
61+
| **1.19** | 8.3.0 - 9.6.0 | 9.6.0 | 16 |
62+
| **1.19.1** | 8.5.0 - 9.6.0 | 9.6.0 | 16 |
63+
| **1.19.2** | 8.5.1 - 9.6.0 | 9.6.0 | 16 |
64+
| **1.19.3** | 8.7.0 - 9.6.0 | 9.6.0 | 16 |
65+
| **1.19.4** | 8.8.0 - 9.6.0 | 9.6.0 | 16 |
66+
| **1.20** | 9.0.2 - 9.6.0 | 9.6.0 | 16 |
67+
| **1.20.1** | 9.0.3 - 9.6.0 | 9.6.0 | 16 |
68+
| **1.20.2** | 9.2.0 - 9.6.0 | 9.6.0 | 16 |
69+
| **1.20.3, 1.20.4** | 9.3.0 - 9.6.0 | 9.6.0 | 16 |
70+
| **1.20.5, 1.20.6** | 9.4.0 - 9.6.0 | 9.6.0 | 16 |
71+
| **1.21** | 9.5.0 - 9.6.0 | 9.6.0 | 16 |
72+
| **1.21.1** | 9.5.2 - 9.6.0 | 9.6.0 | 16 |
73+
| **1.21.2, 1.21.3** | 9.6.0 | 9.6.0 | 16 |
7374

7475
-----
7576

@@ -409,6 +410,21 @@ This is the current roadmap for the CommandAPI (as of 30th April 2024):
409410
</tr>
410411
</thead>
411412
<tbody>
413+
<tr>
414+
<td valign="top"><b>9.6.0</b></td>
415+
<td valign="top">October 2024</td>
416+
<td valign="top">
417+
<b>Minecraft Version Changes:</b>
418+
<ul>
419+
<li>Adds support for Minecraft 1.21.2 and 1.21.3</li>
420+
</ul>
421+
<b>CommandAPI Changes:</b>
422+
<ul>
423+
<li>https://github.com/JorelAli/CommandAPI/pull/594 Adds a config option to allow the CommandAPI to be more lenient when updating to a new minor version (e.g. from 1.21 to 1.21.1)</li>
424+
<li>https://github.com/JorelAli/CommandAPI/pull/596, https://github.com/JorelAli/CommandAPI/pull/605 The plugin's <code>config.yml</code> file will be updated when config options are added or removed</li>
425+
</ul>
426+
</td>
427+
</tr>
412428
<tr>
413429
<td valign="top"><b>9.5.3</b></td>
414430
<td valign="top">August 2024</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.5.3</version>
21+
<version>9.6.0</version>
2222
</parent>
2323

2424
<artifactId>commandapi-annotations</artifactId>

commandapi-codecov/pom.xml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<groupId>dev.jorel</groupId>
2222
<artifactId>commandapi</artifactId>
23-
<version>9.5.3</version>
23+
<version>9.6.0</version>
2424
</parent>
2525

2626
<artifactId>commandapi-codecov</artifactId>
@@ -40,6 +40,16 @@
4040
<artifactId>commandapi-bukkit-core</artifactId>
4141
<version>${project.version}</version>
4242
</dependency>
43+
<dependency>
44+
<groupId>dev.jorel</groupId>
45+
<artifactId>commandapi-plugin</artifactId>
46+
<version>${project.version}</version>
47+
</dependency>
48+
<dependency>
49+
<groupId>dev.jorel</groupId>
50+
<artifactId>commandapi-bukkit-plugin-common</artifactId>
51+
<version>${project.version}</version>
52+
</dependency>
4353

4454
<!-- Code coverage the tests -->
4555
<dependency>

commandapi-core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<parent>
2020
<artifactId>commandapi</artifactId>
2121
<groupId>dev.jorel</groupId>
22-
<version>9.5.3</version>
22+
<version>9.6.0</version>
2323
</parent>
2424
<modelVersion>4.0.0</modelVersion>
2525

commandapi-core/src/main/java/dev/jorel/commandapi/CommandAPI.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,10 @@ public static void onLoad(CommandAPIConfig<?> config) {
109109
CommandAPI.config = new InternalConfig(config);
110110

111111
// Initialize handlers
112-
CommandAPIPlatform<?, ?, ?> platform = CommandAPIVersionHandler.getPlatform();
112+
LoadContext loadContext = CommandAPIVersionHandler.getPlatform();
113+
CommandAPIPlatform<?, ?, ?> platform = loadContext.platform();
113114
new CommandAPIHandler<>(platform);
115+
loadContext.context().run();
114116

115117
// Log platform load
116118
final String platformClassHierarchy;

commandapi-core/src/main/java/dev/jorel/commandapi/CommandAPIConfig.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public abstract class CommandAPIConfig<Impl
3939
boolean verboseOutput = false;
4040
boolean silentLogs = false;
4141
boolean useLatestNMSVersion = false;
42+
boolean beLenientForMinorVersions = false;
4243
String missingExecutorImplementationMessage = "This command has no implementations for %s";
4344

4445
File dispatcherFile = null;
@@ -90,6 +91,21 @@ public Impl useLatestNMSVersion(boolean value) {
9091
return instance();
9192
}
9293

94+
/**
95+
* Sets whether the CommandAPI should load a (potentially unsupported) NMS version
96+
* when updating to a minor release of Minecraft. As an example, this setting can allow
97+
* updating to 1.21.2 from 1.21.1 but doesn't allow updating to 1.22 from 1.21.2.
98+
* Unlike {@link #useLatestNMSVersion(boolean)}, this setting does
99+
* not blindly load the latest NMS version, but will prefer loading the correct NMS implementation when available.
100+
*
101+
* @param value whether the CommandAPI should assume that minor Minecraft releases do not cause incompatibilities
102+
* @return this CommandAPIConfig
103+
*/
104+
public Impl beLenientForMinorVersions(boolean value) {
105+
this.beLenientForMinorVersions = value;
106+
return instance();
107+
}
108+
93109
/**
94110
* Sets the message to display to users when a command has no executor.
95111
* Available formatting parameters are:

commandapi-core/src/main/java/dev/jorel/commandapi/CommandAPIVersionHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public interface CommandAPIVersionHandler {
1212
*
1313
* @return an instance of CommandAPIPlatform which can run on the currently active server
1414
*/
15-
static CommandAPIPlatform<?, ?, ?> getPlatform() {
15+
static LoadContext getPlatform() {
1616
throw new IllegalStateException("You have the wrong copy of the CommandAPI! If you're shading, did you use commandapi-core instead of commandapi-{platform}-shade?");
1717
}
1818
}

commandapi-core/src/main/java/dev/jorel/commandapi/InternalConfig.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ public class InternalConfig {
4040
// Whether we should use the latest NMS version (which may not be compatible)
4141
private final boolean useLatestNMSVersion;
4242

43+
private final boolean beLenientForMinorVersions;
44+
4345
// The message to display when an executor implementation is missing
4446
private final String messageMissingExecutorImplementation;
4547

@@ -65,6 +67,7 @@ public InternalConfig(CommandAPIConfig<?> config) {
6567
this.verboseOutput = config.verboseOutput;
6668
this.silentLogs = config.silentLogs;
6769
this.useLatestNMSVersion = config.useLatestNMSVersion;
70+
this.beLenientForMinorVersions = config.beLenientForMinorVersions;
6871
this.messageMissingExecutorImplementation = config.missingExecutorImplementationMessage;
6972
this.dispatcherFile = config.dispatcherFile;
7073
this.skipSenderProxy = config.skipSenderProxy;
@@ -94,6 +97,13 @@ public boolean shouldUseLatestNMSVersion() {
9497
return this.useLatestNMSVersion;
9598
}
9699

100+
/**
101+
* @return Whether the CommandAPI should assume that minor versions of officially unsupported versions do not cause incompatibilities
102+
*/
103+
public boolean shouldBeLenientForMinorVersions() {
104+
return this.beLenientForMinorVersions;
105+
}
106+
97107
/**
98108
* @return The message to display if a command executor does not have an
99109
* implementation for a given type

0 commit comments

Comments
 (0)