diff --git a/api/src/main/java/com/velocitypowered/api/command/Command.java b/api/src/main/java/com/velocitypowered/api/command/Command.java
index 774c70fdd..68f4594e4 100644
--- a/api/src/main/java/com/velocitypowered/api/command/Command.java
+++ b/api/src/main/java/com/velocitypowered/api/command/Command.java
@@ -13,19 +13,16 @@ import com.velocitypowered.api.proxy.connection.Player;
* Represents a command that can be executed by a {@link CommandSource}
* such as a {@link Player} or the console.
*
- *
Velocity 1.1.0 introduces specialized command subinterfaces to separate
- * command parsing concerns. These include, in order of preference:
+ *
You should not subclass Command
. Use one of the following
+ * subinterfaces:
*
*
- * - {@link BrigadierCommand}, which supports parameterized arguments and
- * specialized execution, tab complete suggestions and permission-checking logic.
+ *
- {@link BrigadierCommand} wraps a Brigadier literal command node. It supports parameterized
+ * arguments and specialized execution, tab complete suggestions and permission-checking logic.
*
- *
- {@link SimpleCommand}, modelled after the convention popularized by
- * Bukkit and BungeeCord. Older classes directly implementing {@link Command}
- * are suggested to migrate to this interface.
+ *
- {@link SimpleCommand} is modelled after the convention popularized by Bukkit and BungeeCord.
*
- *
- {@link RawCommand}, useful for bolting on external command frameworks
- * to Velocity.
+ *
- {@link RawCommand} is useful for bolting on external command frameworks onto Velocity.
*
*
*/
diff --git a/api/src/main/java/com/velocitypowered/api/command/CommandInvocation.java b/api/src/main/java/com/velocitypowered/api/command/CommandInvocation.java
index 4ac13e8ed..bc9be26ea 100644
--- a/api/src/main/java/com/velocitypowered/api/command/CommandInvocation.java
+++ b/api/src/main/java/com/velocitypowered/api/command/CommandInvocation.java
@@ -8,7 +8,7 @@
package com.velocitypowered.api.command;
/**
- * Provides information related to the possible execution of a {@link Command}.
+ * Provides information related to the (possible) execution of a {@link Command}.
*
* @param the type of the arguments
*/
diff --git a/api/src/main/java/com/velocitypowered/api/command/CommandManager.java b/api/src/main/java/com/velocitypowered/api/command/CommandManager.java
index 1ee80e97b..144d3e579 100644
--- a/api/src/main/java/com/velocitypowered/api/command/CommandManager.java
+++ b/api/src/main/java/com/velocitypowered/api/command/CommandManager.java
@@ -22,7 +22,7 @@ public interface CommandManager {
* @param alias the first command alias
* @return a {@link CommandMeta} builder
*/
- CommandMeta.Builder metaBuilder(String alias);
+ CommandMeta.Builder createMetaBuilder(String alias);
/**
* Returns a builder to create a {@link CommandMeta} for
@@ -31,7 +31,7 @@ public interface CommandManager {
* @param command the command
* @return a {@link CommandMeta} builder
*/
- CommandMeta.Builder metaBuilder(BrigadierCommand command);
+ CommandMeta.Builder createMetaBuilder(BrigadierCommand command);
/**
* Registers the specified command with the specified aliases.
@@ -42,7 +42,7 @@ public interface CommandManager {
* @throws IllegalArgumentException if one of the given aliases is already registered
*/
default void register(String alias, Command command, String... otherAliases) {
- register(metaBuilder(alias).aliases(otherAliases).build(), command);
+ register(createMetaBuilder(alias).aliases(otherAliases).build(), command);
}
/**
diff --git a/proxy/src/main/java/com/velocitypowered/proxy/command/VelocityCommandManager.java b/proxy/src/main/java/com/velocitypowered/proxy/command/VelocityCommandManager.java
index 5895acfb4..a624a2106 100644
--- a/proxy/src/main/java/com/velocitypowered/proxy/command/VelocityCommandManager.java
+++ b/proxy/src/main/java/com/velocitypowered/proxy/command/VelocityCommandManager.java
@@ -56,13 +56,13 @@ public class VelocityCommandManager implements CommandManager {
}
@Override
- public CommandMeta.Builder metaBuilder(final String alias) {
+ public CommandMeta.Builder createMetaBuilder(final String alias) {
Preconditions.checkNotNull(alias, "alias");
return new VelocityCommandMeta.Builder(alias);
}
@Override
- public CommandMeta.Builder metaBuilder(final BrigadierCommand command) {
+ public CommandMeta.Builder createMetaBuilder(final BrigadierCommand command) {
Preconditions.checkNotNull(command, "command");
return new VelocityCommandMeta.Builder(command.getNode().getName());
}
@@ -70,7 +70,7 @@ public class VelocityCommandManager implements CommandManager {
@Override
public void register(final BrigadierCommand command) {
Preconditions.checkNotNull(command, "command");
- register(metaBuilder(command).build(), command);
+ register(createMetaBuilder(command).build(), command);
}
@Override
diff --git a/proxy/src/test/java/com/velocitypowered/proxy/command/CommandManagerTests.java b/proxy/src/test/java/com/velocitypowered/proxy/command/CommandManagerTests.java
index a1d6e4e9f..bdf300fd3 100644
--- a/proxy/src/test/java/com/velocitypowered/proxy/command/CommandManagerTests.java
+++ b/proxy/src/test/java/com/velocitypowered/proxy/command/CommandManagerTests.java
@@ -44,7 +44,6 @@ import java.util.List;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicReference;
-import org.checkerframework.checker.nullness.qual.NonNull;
import org.junit.jupiter.api.Test;
public class CommandManagerTests {
@@ -91,7 +90,7 @@ public class CommandManagerTests {
.literal("bar")
.build();
BrigadierCommand aliasesCommand = new BrigadierCommand(barNode);
- CommandMeta meta = manager.metaBuilder(aliasesCommand)
+ CommandMeta meta = manager.createMetaBuilder(aliasesCommand)
.aliases("baZ")
.build();
@@ -412,7 +411,7 @@ public class CommandManagerTests {
CommandNode bazHint = LiteralArgumentBuilder
.literal("baz")
.build();
- CommandMeta meta = manager.metaBuilder("foo")
+ CommandMeta meta = manager.createMetaBuilder("foo")
.aliases("foo2")
.hint(barHint)
.hint(bazHint)