public abstract class CommandHandler extends java.lang.Object implements org.bukkit.command.TabExecutor, NamedExecutor
限定符和类型 | 字段和说明 |
---|---|
protected @NotNull java.util.List<java.lang.String> |
aliases |
protected @NotNull java.util.Map<java.lang.String,java.lang.String> |
aliasesMap |
protected @NotNull java.lang.String |
cmd |
protected @NotNull org.bukkit.plugin.java.JavaPlugin |
plugin |
protected @NotNull java.util.Map<java.lang.String,SubCommand<?>> |
registeredCommands |
protected @NotNull java.util.Map<java.lang.String,CommandHandler> |
registeredHandlers |
构造器和说明 |
---|
CommandHandler(@NotNull org.bukkit.plugin.java.JavaPlugin plugin) |
CommandHandler(@NotNull org.bukkit.plugin.java.JavaPlugin plugin,
@NotNull java.lang.String cmd) |
CommandHandler(@NotNull org.bukkit.plugin.java.JavaPlugin plugin,
@NotNull java.lang.String cmd,
java.lang.String... aliases) |
限定符和类型 | 方法和说明 |
---|---|
@NotNull java.util.List<java.lang.String> |
getAliases() |
java.util.List<NamedExecutor> |
getExecutors() |
protected @Nullable CommandHandler |
getHandler(@NotNull java.lang.String name) |
@NotNull java.lang.String |
getIdentifier() |
protected @Nullable SubCommand<?> |
getSubCommand(@NotNull java.lang.String name) |
abstract java.lang.Void |
noArgs(org.bukkit.command.CommandSender sender) |
abstract java.lang.Void |
noPermission(org.bukkit.command.CommandSender sender) |
boolean |
onCommand(@NotNull org.bukkit.command.CommandSender sender,
@NotNull org.bukkit.command.Command command,
@NotNull java.lang.String label,
java.lang.String[] args) |
java.lang.Void |
onException(org.bukkit.command.CommandSender sender,
SubCommand<?> cmd,
java.lang.Exception ex) |
java.util.List<java.lang.String> |
onTabComplete(@NotNull org.bukkit.command.CommandSender sender,
@NotNull org.bukkit.command.Command command,
@NotNull java.lang.String alias,
java.lang.String[] args) |
void |
registerHandler(CommandHandler handler) |
void |
registerSubCommand(SubCommand<?> command) |
protected java.lang.String[] |
shortenArgs(java.lang.String[] args) |
java.lang.Void |
unknownCommand(org.bukkit.command.CommandSender sender,
java.lang.String[] args) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
hasPermission, sendMessage, sendMessage
@NotNull protected final @NotNull org.bukkit.plugin.java.JavaPlugin plugin
@NotNull protected final @NotNull java.lang.String cmd
@NotNull protected final @NotNull java.util.List<java.lang.String> aliases
@NotNull protected final @NotNull java.util.Map<java.lang.String,SubCommand<?>> registeredCommands
@NotNull protected final @NotNull java.util.Map<java.lang.String,CommandHandler> registeredHandlers
@NotNull protected final @NotNull java.util.Map<java.lang.String,java.lang.String> aliasesMap
public CommandHandler(@NotNull @NotNull org.bukkit.plugin.java.JavaPlugin plugin)
public CommandHandler(@NotNull @NotNull org.bukkit.plugin.java.JavaPlugin plugin, @NotNull @NotNull java.lang.String cmd)
public CommandHandler(@NotNull @NotNull org.bukkit.plugin.java.JavaPlugin plugin, @NotNull @NotNull java.lang.String cmd, @NotNull java.lang.String... aliases)
public abstract java.lang.Void noArgs(org.bukkit.command.CommandSender sender)
public java.lang.Void unknownCommand(org.bukkit.command.CommandSender sender, java.lang.String[] args)
public abstract java.lang.Void noPermission(org.bukkit.command.CommandSender sender)
public java.lang.Void onException(org.bukkit.command.CommandSender sender, SubCommand<?> cmd, java.lang.Exception ex)
@NotNull public @NotNull java.util.List<java.lang.String> getAliases()
getAliases
在接口中 NamedExecutor
@NotNull public @NotNull java.lang.String getIdentifier()
getIdentifier
在接口中 NamedExecutor
public void registerSubCommand(SubCommand<?> command)
public void registerHandler(CommandHandler handler)
public boolean onCommand(@NotNull @NotNull org.bukkit.command.CommandSender sender, @NotNull @NotNull org.bukkit.command.Command command, @NotNull @NotNull java.lang.String label, java.lang.String[] args)
onCommand
在接口中 org.bukkit.command.CommandExecutor
public java.util.List<java.lang.String> onTabComplete(@NotNull @NotNull org.bukkit.command.CommandSender sender, @NotNull @NotNull org.bukkit.command.Command command, @NotNull @NotNull java.lang.String alias, java.lang.String[] args)
onTabComplete
在接口中 org.bukkit.command.TabCompleter
public java.util.List<NamedExecutor> getExecutors()
@Nullable protected @Nullable CommandHandler getHandler(@NotNull @NotNull java.lang.String name)
@Nullable protected @Nullable SubCommand<?> getSubCommand(@NotNull @NotNull java.lang.String name)
protected java.lang.String[] shortenArgs(java.lang.String[] args)
Copyright © 2024. All rights reserved.