From e6eecd806a02aadc1189ba10c4082d45b1dc3dbf Mon Sep 17 00:00:00 2001 From: Hugo Manrique Date: Sun, 16 May 2021 13:46:38 +0200 Subject: [PATCH 1/2] Document some restrictions in the command API --- .../com/velocitypowered/api/command/BrigadierCommand.java | 2 +- .../java/com/velocitypowered/api/command/Command.java | 4 ++-- .../com/velocitypowered/api/command/CommandManager.java | 8 ++++++-- .../java/com/velocitypowered/api/command/CommandMeta.java | 6 ++++-- .../com/velocitypowered/api/command/InvocableCommand.java | 5 +++++ .../velocitypowered/api/proxy/ConsoleCommandSource.java | 2 -- 6 files changed, 18 insertions(+), 9 deletions(-) diff --git a/api/src/main/java/com/velocitypowered/api/command/BrigadierCommand.java b/api/src/main/java/com/velocitypowered/api/command/BrigadierCommand.java index da40f48a5..67af56634 100644 --- a/api/src/main/java/com/velocitypowered/api/command/BrigadierCommand.java +++ b/api/src/main/java/com/velocitypowered/api/command/BrigadierCommand.java @@ -18,7 +18,7 @@ import com.mojang.brigadier.tree.LiteralCommandNode; public final class BrigadierCommand implements Command { /** - * Return code used by a {@link com.mojang.brigadier.Command} to indicate + * The return code used by a {@link com.mojang.brigadier.Command} to indicate * the command execution should be forwarded to the backend server. */ public static final int FORWARD = 0xF6287429; 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 684589578..7eb68b40c 100644 --- a/api/src/main/java/com/velocitypowered/api/command/Command.java +++ b/api/src/main/java/com/velocitypowered/api/command/Command.java @@ -17,8 +17,8 @@ import org.checkerframework.checker.nullness.qual.NonNull; * 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 must not subclass Command. Use one of the following + * registrable subinterfaces:

* *