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 org.enginehub.piston.Command deprecate(org.enginehub.piston.Command command, String reason, CommandUtil.ReplacementMessageGenerator replacementMessageGenerator)
    • footerWithoutDeprecation

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

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

      public static boolean isDeprecated(org.enginehub.piston.Command command)
    • getSubCommands

      public static Map<String,org.enginehub.piston.Command> getSubCommands(org.enginehub.piston.Command currentCommand)
    • byCleanName

      public static Comparator<org.enginehub.piston.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(org.enginehub.piston.inject.Key<T> type, String name, org.enginehub.piston.inject.InjectedValueAccess injectedValueAccess)