Package net.minecraft.command.argument
Class FunctionArgumentType
java.lang.Object
net.minecraft.command.argument.FunctionArgumentType
- All Implemented Interfaces:
com.mojang.brigadier.arguments.ArgumentType<FunctionArgumentType.FunctionArgument>
public class FunctionArgumentType extends Object implements com.mojang.brigadier.arguments.ArgumentType<FunctionArgumentType.FunctionArgument>
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
FunctionArgumentType.FunctionArgument
-
Field Summary
Fields Modifier and Type Field Description private static Collection<String>
EXAMPLES
private static com.mojang.brigadier.exceptions.DynamicCommandExceptionType
UNKNOWN_FUNCTION_EXCEPTION
private static com.mojang.brigadier.exceptions.DynamicCommandExceptionType
UNKNOWN_FUNCTION_TAG_EXCEPTION
-
Constructor Summary
Constructors Constructor Description FunctionArgumentType()
-
Method Summary
Modifier and Type Method Description static FunctionArgumentType
function()
Collection<String>
getExamples()
private static CommandFunction
getFunction(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, Identifier id)
static com.mojang.datafixers.util.Pair<Identifier,com.mojang.datafixers.util.Either<CommandFunction,Tag<CommandFunction>>>
getFunctionOrTag(com.mojang.brigadier.context.CommandContext<ServerCommandSource> commandContext, String string)
static Collection<CommandFunction>
getFunctions(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, String name)
private static Tag<CommandFunction>
getFunctionTag(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, Identifier id)
FunctionArgumentType.FunctionArgument
parse(com.mojang.brigadier.StringReader stringReader)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.mojang.brigadier.arguments.ArgumentType
listSuggestions
-
Field Details
-
EXAMPLES
-
UNKNOWN_FUNCTION_TAG_EXCEPTION
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType UNKNOWN_FUNCTION_TAG_EXCEPTION -
UNKNOWN_FUNCTION_EXCEPTION
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType UNKNOWN_FUNCTION_EXCEPTION
-
-
Constructor Details
-
FunctionArgumentType
public FunctionArgumentType()
-
-
Method Details
-
function
-
parse
public FunctionArgumentType.FunctionArgument parse(com.mojang.brigadier.StringReader stringReader) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Specified by:
parse
in interfacecom.mojang.brigadier.arguments.ArgumentType<FunctionArgumentType.FunctionArgument>
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getFunction
private static CommandFunction getFunction(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, Identifier id) -
getFunctionTag
private static Tag<CommandFunction> getFunctionTag(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, Identifier id) -
getFunctions
public static Collection<CommandFunction> getFunctions(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, String name) -
getFunctionOrTag
public static com.mojang.datafixers.util.Pair<Identifier,com.mojang.datafixers.util.Either<CommandFunction,Tag<CommandFunction>>> getFunctionOrTag(com.mojang.brigadier.context.CommandContext<ServerCommandSource> commandContext, String string) -
getExamples
- Specified by:
getExamples
in interfacecom.mojang.brigadier.arguments.ArgumentType<FunctionArgumentType.FunctionArgument>
-