Package net.minecraft.commands.arguments
Class ComponentArgument
java.lang.Object
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 final HolderLookup.Provider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Component
getComponent
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> context, String name) parse
(com.mojang.brigadier.StringReader reader) static ComponentArgument
textComponent
(CommandBuildContext context) 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, parse
-
Field Details
-
EXAMPLES
-
ERROR_INVALID_JSON
public static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_INVALID_JSON -
registries
-
-
Constructor Details
-
ComponentArgument
-
-
Method Details
-
getComponent
public static Component getComponent(com.mojang.brigadier.context.CommandContext<CommandSourceStack> context, String name) -
textComponent
-
parse
public Component parse(com.mojang.brigadier.StringReader reader) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Specified by:
parse
in interfacecom.mojang.brigadier.arguments.ArgumentType<Component>
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getExamples
- Specified by:
getExamples
in interfacecom.mojang.brigadier.arguments.ArgumentType<Component>
-