Class OperationArgument
java.lang.Object
net.minecraft.commands.arguments.OperationArgument
- All Implemented Interfaces:
ArgumentType<OperationArgument.Operation>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceprivate static interface -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final SimpleCommandExceptionTypeprivate static final SimpleCommandExceptionTypeprivate static final Collection<String> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic OperationArgument.OperationgetOperation(CommandContext<CommandSourceStack> context, String name) private static OperationArgument.OperationgetOperation(String op) private static OperationArgument.SimpleOperationlistSuggestions(CommandContext<S> context, SuggestionsBuilder builder) static OperationArgumentparse(StringReader reader) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ArgumentType
parse
-
Field Details
-
EXAMPLES
-
ERROR_INVALID_OPERATION
-
ERROR_DIVIDE_BY_ZERO
-
-
Constructor Details
-
OperationArgument
public OperationArgument()
-
-
Method Details
-
operation
-
getOperation
public static OperationArgument.Operation getOperation(CommandContext<CommandSourceStack> context, String name) -
parse
- Specified by:
parsein interfaceArgumentType<OperationArgument.Operation>- Throws:
CommandSyntaxException
-
listSuggestions
public <S> CompletableFuture<Suggestions> listSuggestions(CommandContext<S> context, SuggestionsBuilder builder) - Specified by:
listSuggestionsin interfaceArgumentType<OperationArgument.Operation>
-
getExamples
- Specified by:
getExamplesin interfaceArgumentType<OperationArgument.Operation>
-
getOperation
- Throws:
CommandSyntaxException
-
getSimpleOperation
private static OperationArgument.SimpleOperation getSimpleOperation(String op) throws CommandSyntaxException - Throws:
CommandSyntaxException
-