Package net.minecraft.commands.arguments
Class ComponentArgument
java.lang.Object
net.minecraft.util.parsing.packrat.commands.ParserBasedArgument<Component>
net.minecraft.commands.arguments.ComponentArgument
- All Implemented Interfaces:
com.mojang.brigadier.arguments.ArgumentType<Component>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.brigadier.exceptions.DynamicCommandExceptionType
private static final Collection
<String> private static final com.mojang.serialization.DynamicOps
<Tag> private static final CommandArgumentParser
<Tag> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Component
getRawComponent
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_87118_, String p_87119_) static Component
getResolvedComponent
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_401081_, String p_401270_) static Component
getResolvedComponent
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_401158_, String p_401089_, Entity p_401342_) static ComponentArgument
textComponent
(CommandBuildContext p_324401_) Methods inherited from class net.minecraft.util.parsing.packrat.commands.ParserBasedArgument
listSuggestions, parse
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
parse
-
Field Details
-
EXAMPLES
-
ERROR_INVALID_COMPONENT
public static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_INVALID_COMPONENT -
OPS
-
TAG_PARSER
-
-
Constructor Details
-
ComponentArgument
-
-
Method Details
-
getRawComponent
public static Component getRawComponent(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_87118_, String p_87119_) -
getResolvedComponent
public static Component getResolvedComponent(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_401158_, String p_401089_, @Nullable Entity p_401342_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getResolvedComponent
public static Component getResolvedComponent(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_401081_, String p_401270_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
textComponent
-
getExamples
-