public final class CommandMapUtil extends Object
CommandMap instance.| Modifier and Type | Method and Description |
|---|---|
static <T extends CommandExecutor> |
registerCommand(Plugin plugin,
T command,
String... aliases)
Registers a CommandExecutor with the server
|
static <T extends CommandExecutor> |
registerCommand(Plugin plugin,
T command,
String permission,
String permissionMessage,
String description,
String... aliases)
Registers a CommandExecutor with the server
|
static <T extends CommandExecutor> |
unregisterCommand(T command)
Unregisters a CommandExecutor with the server
|
@Nonnull public static <T extends CommandExecutor> T registerCommand(@Nonnull Plugin plugin, @Nonnull T command, @Nonnull String... aliases)
T - the command executor class typeplugin - the plugin instancecommand - the command instancealiases - the command aliases@Nonnull public static <T extends CommandExecutor> T registerCommand(@Nonnull Plugin plugin, @Nonnull T command, String permission, String permissionMessage, String description, @Nonnull String... aliases)
T - the command executor class typeplugin - the plugin instancecommand - the command instancepermission - the command permissionpermissionMessage - the message sent when the sender doesn't the required permissiondescription - the command descriptionaliases - the command aliases@Nonnull public static <T extends CommandExecutor> T unregisterCommand(@Nonnull T command)
T - the command executor class typecommand - the command instanceCopyright © 2020. All rights reserved.