You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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
Copy file name to clipboardExpand all lines: docs/en/create-commands/registration.md
+6-1
Original file line number
Diff line number
Diff line change
@@ -181,7 +181,12 @@ new CommandAPICommand("spawnpigs")
181
181
void register()
182
182
```
183
183
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.
Copy file name to clipboardExpand all lines: docs/en/dev-setup/shading.md
+6-7
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,6 @@ public class CommandAPIConfig {
42
42
CommandAPIConfigmissingExecutorImplementationMessage(Stringvalue); // Set message to display when executor implementation is missing
43
43
CommandAPIConfigdispatcherFile(Filefile); // If not null, the CommandAPI will create a JSON file with Brigadier's command tree
44
44
CommandAPIConfigsetNamespace(Stringnamespace); // The namespace to use when the CommandAPI registers a command
45
-
CommandAPIConfigusePluginNamespace(); // Whether the CommandAPI should use the name of the plugin passed into the CommandAPIConfig implementation as the default namespace for commands
46
45
47
46
<T>CommandAPIConfiginitializeNBTAPI(Class<T>nbtContainerClass, Function<Object, T>nbtContainerConstructor); // Initializes hooks with an NBT API. See NBT arguments documentation page for more info
48
47
}
@@ -114,7 +113,7 @@ Add the CommandAPI shade dependency:
114
113
<dependency>
115
114
<groupId>dev.jorel</groupId>
116
115
<artifactId>commandapi-bukkit-shade</artifactId>
117
-
<version>9.7.0</version>
116
+
<version>10.0.0</version>
118
117
</dependency>
119
118
</dependencies>
120
119
```
@@ -126,7 +125,7 @@ Add the CommandAPI shade dependency:
Copy file name to clipboardExpand all lines: docs/en/intro.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ Think of it as the "knowledge you should know before using this API".
26
26
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:
27
27
28
28
-**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).
30
30
- 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.
Copy file name to clipboardExpand all lines: docs/en/upgrading-parts/9.7.0-to-10.0.0.md
+16
Original file line number
Diff line number
Diff 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
+
1
17
`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:
Copy file name to clipboardExpand all lines: docs/en/velocity/intro.md
+6-52
Original file line number
Diff line number
Diff line change
@@ -9,61 +9,15 @@ authors:
9
9
10
10
# Velocity
11
11
12
-
:::warning Developer's Note:
12
+
:::info **Developer's Note:**
13
13
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.
18
15
19
16
:::
20
17
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:
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:
67
21
68
22
<divclass="maven">
69
23
@@ -72,7 +26,7 @@ As mentioned, Velocity can only be accessed with snapshot builds. These snapshot
0 commit comments