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 interfaceFunctionArgumentType.FunctionArgument -
Field Summary
Fields Modifier and Type Field Description private static Collection<String>EXAMPLESprivate static com.mojang.brigadier.exceptions.DynamicCommandExceptionTypeUNKNOWN_FUNCTION_EXCEPTIONprivate static com.mojang.brigadier.exceptions.DynamicCommandExceptionTypeUNKNOWN_FUNCTION_TAG_EXCEPTION -
Constructor Summary
Constructors Constructor Description FunctionArgumentType() -
Method Summary
Modifier and Type Method Description static FunctionArgumentTypefunction()Collection<String>getExamples()private static CommandFunctiongetFunction(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.FunctionArgumentparse(com.mojang.brigadier.StringReader stringReader)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
parsein 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:
getExamplesin interfacecom.mojang.brigadier.arguments.ArgumentType<FunctionArgumentType.FunctionArgument>
-