Class CommandUtil

java.lang.Object
com.sk89q.worldedit.internal.command.CommandUtil

public class CommandUtil extends Object
  • Method Details

    • createNewCommandReplacementText

      public static com.sk89q.worldedit.util.formatting.text.Component createNewCommandReplacementText(String suggestedCommand)
    • deprecate

      public static Command deprecate(Command command, String reason, CommandUtil.ReplacementMessageGenerator replacementMessageGenerator)
    • footerWithoutDeprecation

      public static Optional<com.sk89q.worldedit.util.formatting.text.Component> footerWithoutDeprecation(Command command)
    • deprecationWarning

      public static Optional<com.sk89q.worldedit.util.formatting.text.Component> deprecationWarning(Command command)
    • isDeprecated

      public static boolean isDeprecated(Command command)
    • getSubCommands

      public static Map<String,Command> getSubCommands(Command currentCommand)
    • byCleanName

      public static Comparator<Command> byCleanName()
    • fixSuggestions

      public static List<String> fixSuggestions(String arguments, List<Substring> suggestions)
      Fix suggestions to replace the last space-separated word in arguments.
    • checkCommandArgument

      public static void checkCommandArgument(boolean condition, String message)
      Require condition to be true, otherwise throw a CommandException with the given message.
      Parameters:
      condition - the condition to check
      message - the message for failure
    • checkCommandArgument

      public static void checkCommandArgument(boolean condition, com.sk89q.worldedit.util.formatting.text.Component message)
      Require condition to be true, otherwise throw a CommandException with the given message.
      Parameters:
      condition - the condition to check
      message - the message for failure
    • requireIV

      public static <T> T requireIV(Key<T> type, String name, InjectedValueAccess injectedValueAccess)