Rename CommandManager#metaBuilder -> CommandManager#createMetaBuilder

This commit is contained in:
Andrew Steinborn
2021-04-17 04:23:58 -04:00
parent cf7c2b004a
commit 2254e3b617
5 changed files with 15 additions and 19 deletions

View File

@@ -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.
*
* <p>Velocity 1.1.0 introduces specialized command subinterfaces to separate
* command parsing concerns. These include, in order of preference:
* <p><strong>You should not subclass <code>Command</code></strong>. Use one of the following
* subinterfaces:</p>
*
* <ul>
* <li>{@link BrigadierCommand}, which supports parameterized arguments and
* specialized execution, tab complete suggestions and permission-checking logic.
* <li>{@link BrigadierCommand} wraps a Brigadier literal command node. It supports parameterized
* arguments and specialized execution, tab complete suggestions and permission-checking logic.
*
* <li>{@link SimpleCommand}, modelled after the convention popularized by
* Bukkit and BungeeCord. Older classes directly implementing {@link Command}
* are suggested to migrate to this interface.
* <li>{@link SimpleCommand} is modelled after the convention popularized by Bukkit and BungeeCord.
*
* <li>{@link RawCommand}, useful for bolting on external command frameworks
* to Velocity.
* <li>{@link RawCommand} is useful for bolting on external command frameworks onto Velocity.
*
* </ul>
*/

View File

@@ -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 <T> the type of the arguments
*/

View File

@@ -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);
}
/**