Package net.minecraft.command.argument
Class OperationArgumentType
java.lang.Object
net.minecraft.command.argument.OperationArgumentType
- All Implemented Interfaces:
com.mojang.brigadier.arguments.ArgumentType<OperationArgumentType.Operation>
public class OperationArgumentType extends Object implements com.mojang.brigadier.arguments.ArgumentType<OperationArgumentType.Operation>
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static interface
OperationArgumentType.IntOperator
static interface
OperationArgumentType.Operation
-
Field Summary
Fields Modifier and Type Field Description private static com.mojang.brigadier.exceptions.SimpleCommandExceptionType
DIVISION_ZERO_EXCEPTION
private static Collection<String>
EXAMPLES
private static com.mojang.brigadier.exceptions.SimpleCommandExceptionType
INVALID_OPERATION
-
Constructor Summary
Constructors Constructor Description OperationArgumentType()
-
Method Summary
Modifier and Type Method Description Collection<String>
getExamples()
private static OperationArgumentType.IntOperator
getIntOperator(String string)
static OperationArgumentType.Operation
getOperation(com.mojang.brigadier.context.CommandContext<ServerCommandSource> commandContext, String string)
private static OperationArgumentType.Operation
getOperator(String string)
<S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
listSuggestions(com.mojang.brigadier.context.CommandContext<S> context, com.mojang.brigadier.suggestion.SuggestionsBuilder builder)
static OperationArgumentType
operation()
OperationArgumentType.Operation
parse(com.mojang.brigadier.StringReader stringReader)
-
Field Details
-
EXAMPLES
-
INVALID_OPERATION
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType INVALID_OPERATION -
DIVISION_ZERO_EXCEPTION
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType DIVISION_ZERO_EXCEPTION
-
-
Constructor Details
-
OperationArgumentType
public OperationArgumentType()
-
-
Method Details
-
operation
-
getOperation
public static OperationArgumentType.Operation getOperation(com.mojang.brigadier.context.CommandContext<ServerCommandSource> commandContext, String string) -
parse
public OperationArgumentType.Operation parse(com.mojang.brigadier.StringReader stringReader) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Specified by:
parse
in interfacecom.mojang.brigadier.arguments.ArgumentType<OperationArgumentType.Operation>
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
listSuggestions
public <S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> listSuggestions(com.mojang.brigadier.context.CommandContext<S> context, com.mojang.brigadier.suggestion.SuggestionsBuilder builder)- Specified by:
listSuggestions
in interfacecom.mojang.brigadier.arguments.ArgumentType<OperationArgumentType.Operation>
-
getExamples
- Specified by:
getExamples
in interfacecom.mojang.brigadier.arguments.ArgumentType<OperationArgumentType.Operation>
-
getOperator
private static OperationArgumentType.Operation getOperator(String string) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getIntOperator
private static OperationArgumentType.IntOperator getIntOperator(String string) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-