Class CommandUtils

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
      CommandUtils()
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      static SimpleCommandMap getCommandMap() 获取 SimpleCommandMap.
      static Map<String, Command> getKnownCommands() 获取所有已注册指令.
      static PluginCommand newPluginCommand(@NonNull() String name, @NonNull() Plugin owner) 新建一个 PluginCommand 对象.
      static void unregisterCommand(String command) 卸载指令.
      static void setPlugin(PluginCommand command, Plugin plugin) 设置指令拥有者.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CommandUtils

        CommandUtils()
    • Method Detail

      • getCommandMap

        @NonNull() static SimpleCommandMap getCommandMap()

        获取 SimpleCommandMap.

        Returns:

        SimpleCommandMap.

      • getKnownCommands

        @NonNull() static Map<String, Command> getKnownCommands()

        获取所有已注册指令.

        Returns:

        所有已注册指令.

      • newPluginCommand

        @Nullable() static PluginCommand newPluginCommand(@NonNull() String name, @NonNull() Plugin owner)

        新建一个 PluginCommand 对象.

        Parameters:
        name - 指令名.
        owner - 创建指令的插件.
        Returns:

        对应的 PluginCommand 对象.

      • unregisterCommand

         static void unregisterCommand(String command)

        卸载指令.

        Parameters:
        command - 待卸载指令.
      • setPlugin

         static void setPlugin(PluginCommand command, Plugin plugin)

        设置指令拥有者.

        Parameters:
        command - 待设置指令.