Skip to content

Commit 7b2e500

Browse files
committed
Merge master into dev/dev
2 parents f556d57 + 1f42ad4 commit 7b2e500

File tree

13 files changed

+68
-91
lines changed

13 files changed

+68
-91
lines changed

docs/.vitepress/theme/upgrading/upgrading.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const upgradingInfos: UpgradingInfo[] = [
1818
{from: '9.0.1', to: '9.0.2'},
1919
{from: '9.0.3', to: '9.1.0'},
2020
{from: '9.2.0', to: '9.3.0'},
21-
{from: `9.7.0`, to: '10.0.0'},
21+
{from: '9.7.0', to: '10.0.0'},
2222
]
2323

2424
export const keyVersions = Array.from(new Set(upgradingInfos.map(info => [info.from, info.to]).flat()));

docs/en/create-commands/arguments/suggestions/tooltips.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,18 @@ To use these features, the CommandAPI includes the `stringsWithTooltips` methods
2323

2424
```java
2525
ArgumentSuggestions stringsWithTooltips(IStringTooltip... suggestions);
26+
ArgumentSuggestions stringsWithTooltips(Collection<IStringTooltip> suggestions);
2627
ArgumentSuggestions stringsWithTooltips(Function<SuggestionInfo, IStringTooltip[]> suggestions);
2728
```
2829

29-
The `StringTooltip` class is the CommandAPI's default implementation of `IStringTooltip`, which has some static methods to construct tooltips easily:
30+
The `StringTooltip` and `BukkitStringTooltip` classes are the CommandAPI's default implementations of `IStringTooltip`, which have some static methods to construct tooltips easily:
3031

3132
```java
3233
StringTooltip none(String suggestion);
3334
StringTooltip ofString(String suggestion, String tooltip);
3435
StringTooltip ofMessage(String suggestion, Message tooltip);
35-
StringTooltip ofBaseComponents(String suggestion, BaseComponent... tooltip);
36-
StringTooltip ofAdventureComponent(String suggestion, Component tooltip);
36+
BukkitStringTooltip ofBaseComponents(String suggestion, BaseComponent... tooltip);
37+
BukkitStringTooltip ofAdventureComponent(String suggestion, ComponentLike tooltip);
3738
```
3839

3940
The first method, `StringTooltip.none(String)` creates a normal suggestion entry with no tooltip. The other methods create a suggestion with the provided tooltip text in either `String`, Brigadier `Message`, Spigot `BaseComponent[]` or Adventure `Component` format.
@@ -126,8 +127,8 @@ Just like the `StringTooltip` class, the `Tooltip<S>` class provides the followi
126127
Tooltip<S> none(S object);
127128
Tooltip<S> ofString(S object, String tooltip);
128129
Tooltip<S> ofMessage(S object, Message tooltip);
129-
Tooltip<S> ofBaseComponents(S object, BaseComponent... tooltip);
130-
Tooltip<S> ofAdventureComponent(S object, Component tooltip);
130+
BukkitTooltip<S> ofBaseComponents(S object, BaseComponent... tooltip);
131+
BukkitTooltip<S> ofAdventureComponent(S object, ComponentLike tooltip);
131132

132133
Tooltip<S>[] arrayOf(Tooltip<S>... tooltips);
133134
```

docs/en/create-commands/registration.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,12 @@ new CommandAPICommand("spawnpigs")
181181
void register()
182182
```
183183

184-
Registers the command with the default `minecraft` namespace. If you are [shading](../dev-setup/shading) you can set the default namespace using `CommandAPIConfig#setNamespace(String)` or `CommandAPIBukkitConfig#usePluginNamespace()`.
184+
Registers the command with the default namespace.
185+
186+
If you are not shading, the default namespace is going to be `commandapi`. Hence it is recommended that you use one of the two methods below to register your commands.
187+
188+
If you are [shading](../dev-setup/shading), the default namespace is going to be the name of your plugin. You can also change the default namespace using `CommandAPIConfig#setNamespace(String)`.
189+
Hence you can safely use this method to register your commands without the namespace being `commandapi`, while you're also able to change individual namespaces for commands using the methods below.
185190

186191
```java
187192
void register(String namespace)

docs/en/dev-setup/annotations.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ The annotation system effectively needs to be added twice: Once for compilation
2222
<dependency>
2323
<groupId>dev.jorel</groupId>
2424
<artifactId>commandapi-annotations</artifactId>
25-
<version>9.7.0</version>
25+
<version>10.0.0</version>
2626
<scope>provided</scope>
2727
</dependency>
2828
</dependencies>
@@ -42,7 +42,7 @@ The annotation system effectively needs to be added twice: Once for compilation
4242
<path>
4343
<groupId>dev.jorel</groupId>
4444
<artifactId>commandapi-annotations</artifactId>
45-
<version>9.7.0</version>
45+
<version>10.0.0</version>
4646
</path>
4747
</annotationProcessorPaths>
4848
</configuration>
@@ -81,17 +81,17 @@ The annotation system effectively needs to be added twice: Once for compilation
8181

8282
```groovy
8383
dependencies {
84-
compileOnly "dev.jorel:commandapi-annotations:9.7.0"
85-
annotationProcessor "dev.jorel:commandapi-annotations:9.7.0"
84+
compileOnly "dev.jorel:commandapi-annotations:10.0.0"
85+
annotationProcessor "dev.jorel:commandapi-annotations:10.0.0"
8686
}
8787
```
8888
</div>
8989
<div class="kts">
9090

9191
```kotlin
9292
dependencies {
93-
compileOnly("dev.jorel:commandapi-annotations:9.7.0")
94-
annotationProcessor("dev.jorel:commandapi-annotations:9.7.0")
93+
compileOnly("dev.jorel:commandapi-annotations:10.0.0")
94+
annotationProcessor("dev.jorel:commandapi-annotations:10.0.0")
9595
}
9696
```
9797
</div>

docs/en/dev-setup/setup.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ If you've never used a build system before, I highly recommend it! It makes it e
5151
<dependency>
5252
<groupId>dev.jorel</groupId>
5353
<artifactId>commandapi-bukkit-core</artifactId>
54-
<version>9.7.0</version>
54+
<version>10.0.0</version>
5555
<scope>provided</scope>
5656
</dependency>
5757
</dependencies>
@@ -90,7 +90,7 @@ If you've never used a build system before, I highly recommend it! It makes it e
9090

9191
```groovy
9292
dependencies {
93-
compileOnly "dev.jorel:commandapi-bukkit-core:9.7.0"
93+
compileOnly "dev.jorel:commandapi-bukkit-core:10.0.0"
9494
}
9595
```
9696

@@ -99,7 +99,7 @@ If you've never used a build system before, I highly recommend it! It makes it e
9999

100100
```kotlin
101101
dependencies {
102-
compileOnly("dev.jorel:commandapi-bukkit-core:9.7.0")
102+
compileOnly("dev.jorel:commandapi-bukkit-core:10.0.0")
103103
}
104104
```
105105

docs/en/dev-setup/shading.md

+6-7
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ public class CommandAPIConfig {
4242
CommandAPIConfig missingExecutorImplementationMessage(String value); // Set message to display when executor implementation is missing
4343
CommandAPIConfig dispatcherFile(File file); // If not null, the CommandAPI will create a JSON file with Brigadier's command tree
4444
CommandAPIConfig setNamespace(String namespace); // The namespace to use when the CommandAPI registers a command
45-
CommandAPIConfig usePluginNamespace(); // Whether the CommandAPI should use the name of the plugin passed into the CommandAPIConfig implementation as the default namespace for commands
4645

4746
<T> CommandAPIConfig initializeNBTAPI(Class<T> nbtContainerClass, Function<Object, T> nbtContainerConstructor); // Initializes hooks with an NBT API. See NBT arguments documentation page for more info
4847
}
@@ -114,7 +113,7 @@ Add the CommandAPI shade dependency:
114113
<dependency>
115114
<groupId>dev.jorel</groupId>
116115
<artifactId>commandapi-bukkit-shade</artifactId>
117-
<version>9.7.0</version>
116+
<version>10.0.0</version>
118117
</dependency>
119118
</dependencies>
120119
```
@@ -126,7 +125,7 @@ Add the CommandAPI shade dependency:
126125
<dependency>
127126
<groupId>dev.jorel</groupId>
128127
<artifactId>commandapi-bukkit-shade-mojang-mapped</artifactId>
129-
<version>9.7.0</version>
128+
<version>10.0.0</version>
130129
</dependency>
131130
</dependencies>
132131
```
@@ -222,15 +221,15 @@ Next, we declare our dependencies:
222221

223222
```groovy
224223
dependencies {
225-
implementation "dev.jorel:commandapi-bukkit-shade:9.7.0"
224+
implementation "dev.jorel:commandapi-bukkit-shade:10.0.0"
226225
}
227226
```
228227
</div>
229228
<div class="mojmap">
230229

231230
```groovy
232231
dependencies {
233-
implementation "dev.jorel:commandapi-bukkit-shade-mojang-mapped:9.7.0"
232+
implementation "dev.jorel:commandapi-bukkit-shade-mojang-mapped:10.0.0"
234233
}
235234
```
236235
</div>
@@ -240,15 +239,15 @@ dependencies {
240239

241240
```kotlin
242241
dependencies {
243-
implementation("dev.jorel:commandapi-bukkit-shade:9.7.0")
242+
implementation("dev.jorel:commandapi-bukkit-shade:10.0.0")
244243
}
245244
```
246245
</div>
247246
<div class="mojmap">
248247

249248
```kotlin
250249
dependencies {
251-
implementation("dev.jorel:commandapi-bukkit-shade-mojang-mapped:9.7.0")
250+
implementation("dev.jorel:commandapi-bukkit-shade-mojang-mapped:10.0.0")
252251
}
253252
```
254253
</div>

docs/en/intro.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Think of it as the "knowledge you should know before using this API".
2626
The CommandAPI does not follow the "standard" method of registering commands. In other words, commands which are registered with the CommandAPI will be registered as pure vanilla Minecraft commands as opposed to Bukkit or Spigot commands. This means that the following implications exist:
2727

2828
- **Commands should not be declared in the `plugin.yml` file.**
29-
- Commands are automatically registered under the `minecraft` namespace. For example, if you register a command `/hello`, you can also run it using `/minecraft:hello`. However, you can change this default `minecraft` namespace. More about this [on the command registration page](./create-commands/registration#registering-the-command).
29+
- Commands are automatically registered under the namespace of the plugin that registered the command. For example, if you register a command `/hello`, you can also run it using `/<pluginname>:hello`. However, you can change the default namespace. More about this [on the command registration page](./create-commands/registration#registering-the-command).
3030
- Commands are not "linked" to a certain plugin. In other words, you can’t look up which commands are registered by which plugin. This is not the case for commands on Paper versions that have Paper's Brigadier API, or in other words, any Paper build starting in 1.20.6 with build 65.
3131

3232
## How this documentation works

docs/en/kotlin-dsl/intro.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ To install the DSL, you need to add the `commandapi-bukkit-kotlin` dependency in
2626
<dependency>
2727
<groupId>dev.jorel</groupId>
2828
<artifactId>commandapi-bukkit-kotlin</artifactId>
29-
<version>9.7.0</version>
29+
<version>10.0.0</version>
3030
</dependency>
3131
</dependencies>
3232
```
@@ -106,7 +106,7 @@ Next, you need to add the dependency:
106106

107107
```groovy
108108
dependencies {
109-
implementation "dev.jorel:commandapi-bukkit-kotlin:9.7.0"
109+
implementation "dev.jorel:commandapi-bukkit-kotlin:10.0.0"
110110
}
111111
```
112112

@@ -115,7 +115,7 @@ dependencies {
115115

116116
```kotlin
117117
dependencies {
118-
implementation("dev.jorel:commandapi-bukkit-kotlin:9.7.0")
118+
implementation("dev.jorel:commandapi-bukkit-kotlin:10.0.0")
119119
}
120120
```
121121

docs/en/test/setup.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ When you add the dependencies for MockBukkit and `commandapi-bukkit-test-toolkit
2929
<dependency>
3030
<groupId>dev.jorel</groupId>
3131
<artifactId>commandapi-bukkit-test-toolkit</artifactId>
32-
<version>9.7.0</version>
32+
<version>10.0.0</version>
3333
<scope>test</scope>
3434
</dependency>
3535

3636
<!-- May be the shade dependency and/or mojang-mapped -->
3737
<dependency>
3838
<groupId>dev.jorel</groupId>
3939
<artifactId>commandapi-bukkit-core</artifactId>
40-
<version>9.7.0</version>
40+
<version>10.0.0</version>
4141
<scope>provided</scope>
4242
</dependency>
4343

@@ -70,10 +70,10 @@ dependencies {
7070
// See https://github.com/MockBukkit/MockBukkit?tab=readme-ov-file#mag-usage for latest version
7171
testImplementation 'com.github.seeseemelk:MockBukkit-v1.21:3.128.0'
7272
73-
testImplementation 'dev.jorel:commandapi-bukkit-test-toolkit:9.7.0'
73+
testImplementation 'dev.jorel:commandapi-bukkit-test-toolkit:10.0.0'
7474
7575
// May be the shade dependency and/or mojang-mapped
76-
compileOnly 'dev.jorel:commandapi-bukkit-core:9.7.0'
76+
compileOnly 'dev.jorel:commandapi-bukkit-core:10.0.0'
7777
7878
// Can also be paper-api
7979
compileOnly 'org.spigotmc:spigot-api:1.21.1-R0.1-SNAPSHOT'
@@ -91,10 +91,10 @@ dependencies {
9191
// See https://github.com/MockBukkit/MockBukkit?tab=readme-ov-file#mag-usage for latest version
9292
testImplementation("com.github.seeseemelk:MockBukkit-v1.21:3.128.0")
9393

94-
testImplementation("dev.jorel:commandapi-bukkit-test-toolkit:9.7.0")
94+
testImplementation("dev.jorel:commandapi-bukkit-test-toolkit:10.0.0")
9595

9696
// May be the shade dependency and/or mojang-mapped
97-
compileOnly("dev.jorel:commandapi-bukkit-core:9.7.0")
97+
compileOnly("dev.jorel:commandapi-bukkit-core:10.0.0")
9898

9999
// Can also be paper-api
100100
compileOnly("org.spigotmc:spigot-api:1.21.1-R0.1-SNAPSHOT")

docs/en/upgrading-parts/9.7.0-to-10.0.0.md

+16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
### Deprecated methods
2+
3+
For 10.0.0, all previously deprecated methods have been removed. Please make sure you use the replacement methods for the deprecated methods. The replacement methods should be described in the JavaDocs of deprecated methods.
4+
5+
-----
6+
7+
### Default namespace changes
8+
9+
The default namespace has been updated from `minecraft` to the plugin's name. If you are not shading, the default namespace is going to be `commandapi`. If you are shading, the default namespace is going to be your plugin's name.
10+
11+
Along with this change, the `CommandAPIBukkitConfig#usePluginNamespace()` has been deprecated since it is now default behaviour.
12+
13+
-----
14+
15+
### `NativeProxyCommandSender` changes
16+
117
`NativeProxyCommandSender` used to be a class, but this version changed it to an interface. Any code compiled against an earlier version that references any method of `NativeProxyCommandSender` may throw the following `IncompatibleClassChangeError` when run using the new version of the API:
218

319
```

docs/en/velocity/intro.md

+6-52
Original file line numberDiff line numberDiff line change
@@ -9,61 +9,15 @@ authors:
99

1010
# Velocity
1111

12-
:::warning Developer's Note:
12+
:::info **Developer's Note:**
1313

14-
The CommandAPI hasn't been released for Velocity yet.
15-
We do, however, offer snapshot builds. This small section on Velocity will outline how to get the snapshot builds and what limitations the CommandAPI currently has on Velocity.
16-
17-
This page focuses on outlining how to set up the CommandAPI for Velocity. It expects that you are already familiar with how to set up a Velocity plugin.
14+
This section assumes you are already familiar with how to set up a Velocity plugin.
1815

1916
:::
2017

21-
## Adding the snapshot repository with Maven or Gradle
22-
23-
Because we do not have an official release yet, the snapshot builds are not published in the Maven Central repository. Instead you need to add our snapshot repository:
24-
25-
<div class="maven">
26-
27-
```xml
28-
<repositories>
29-
<repository>
30-
<id>oss.sonatype.org-snapshot</id>
31-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
32-
</repository>
33-
</repositories>
34-
```
35-
36-
</div>
37-
<div class="gradle">
38-
39-
<div class="groovy">
40-
41-
```groovy
42-
repositories {
43-
maven {
44-
url = "https://s01.oss.sonatype.org/content/repositories/snapshots"
45-
}
46-
}
47-
```
48-
49-
</div>
50-
<div class="kts">
51-
52-
```kotlin
53-
repositories {
54-
maven {
55-
url = uri("https://s01.oss.sonatype.org/content/repositories/snapshots")
56-
}
57-
}
58-
```
59-
60-
</div>
61-
62-
</div>
63-
6418
## Adding the dependency
6519

66-
As mentioned, Velocity can only be accessed with snapshot builds. These snapshot build versions are following standard semantic versioning and thus have the `-SNAPSHOT` suffix:
20+
Add the dependency to your list of dependencies in your build script:
6721

6822
<div class="maven">
6923

@@ -72,7 +26,7 @@ As mentioned, Velocity can only be accessed with snapshot builds. These snapshot
7226
<dependency>
7327
<groupId>dev.jorel</groupId>
7428
<artifactId>commandapi-velocity-shade</artifactId>
75-
<version>9.7.1-SNAPSHOT</version>
29+
<version>10.0.0</version>
7630
</dependency>
7731
</dependencies>
7832
```
@@ -84,7 +38,7 @@ As mentioned, Velocity can only be accessed with snapshot builds. These snapshot
8438

8539
```groovy
8640
dependencies {
87-
implementation "dev.jorel:commandapi-velocity-shade:9.7.1-SNAPSHOT"
41+
implementation "dev.jorel:commandapi-velocity-shade:10.0.0"
8842
}
8943
```
9044

@@ -93,7 +47,7 @@ dependencies {
9347

9448
```kotlin
9549
dependencies {
96-
implementation("dev.jorel:commandapi-velocity-shade:9.7.1-SNAPSHOT")
50+
implementation("dev.jorel:commandapi-velocity-shade:10.0.0")
9751
}
9852
```
9953

reference-code/gradle/libs.versions.toml

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ com-mojang-authlib = "3.3.39"
77
com-mojang-brigadier = "1.0.17"
88
com-velocitypowered-velocity-api = "3.4.0-SNAPSHOT"
99
de-tr7zw-item-nbt-api = "2.11.1"
10-
dev-jorel-commandapi-annotations = "9.7.0"
11-
dev-jorel-commandapi-bukkit-core = "9.7.0"
12-
dev-jorel-commandapi-bukkit-kotlin = "9.7.0"
13-
dev-jorel-commandapi-bukkit-test-toolkit = "9.7.0"
14-
dev-jorel-commandapi-velocity-shade = "9.6.2-SNAPSHOT"
10+
dev-jorel-commandapi-annotations = "10.0.0"
11+
dev-jorel-commandapi-bukkit-core = "10.0.0"
12+
dev-jorel-commandapi-bukkit-kotlin = "10.0.0"
13+
dev-jorel-commandapi-bukkit-test-toolkit = "10.0.0"
14+
dev-jorel-commandapi-velocity-shade = "10.0.0"
1515
io-papermc-paper-paper-api = "1.21-R0.1-SNAPSHOT"
1616
net-kyori-adventure-platform-bukkit = "4.2.0"
1717
org-jetbrains-kotlin-kotlin-stdlib = "2.0.0"

0 commit comments

Comments
 (0)