Class CommandUtil
java.lang.Object
com.sk89q.worldedit.internal.command.CommandUtil
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
static interface
-
Method Summary
Modifier and TypeMethodDescriptionstatic Comparator<Command>
static void
checkCommandArgument
(boolean condition, com.sk89q.worldedit.util.formatting.text.Component message) static void
checkCommandArgument
(boolean condition, String message) static com.sk89q.worldedit.util.formatting.text.Component
createNewCommandReplacementText
(String suggestedCommand) static Command
deprecate
(Command command, String reason, CommandUtil.ReplacementMessageGenerator replacementMessageGenerator) static Optional<com.sk89q.worldedit.util.formatting.text.Component>
deprecationWarning
(Command command) fixSuggestions
(String arguments, List<Substring> suggestions) Fixsuggestions
to replace the last space-separated word inarguments
.static Optional<com.sk89q.worldedit.util.formatting.text.Component>
footerWithoutDeprecation
(Command command) getSubCommands
(Command currentCommand) static boolean
isDeprecated
(Command command) static <T> T
requireIV
(Key<T> type, String name, InjectedValueAccess injectedValueAccess)
-
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) -
deprecationWarning
-
isDeprecated
-
getSubCommands
-
byCleanName
-
fixSuggestions
Fixsuggestions
to replace the last space-separated word inarguments
. -
checkCommandArgument
- Parameters:
condition
- the condition to checkmessage
- the message for failure
-
checkCommandArgument
public static void checkCommandArgument(boolean condition, com.sk89q.worldedit.util.formatting.text.Component message) - Parameters:
condition
- the condition to checkmessage
- the message for failure
-
requireIV
-