Package net.minecraft.commands.arguments
Class MessageArgument
java.lang.Object
net.minecraft.commands.arguments.MessageArgument
- All Implemented Interfaces:
com.mojang.brigadier.arguments.ArgumentType<MessageArgument.Message>
,PreviewedArgument<MessageArgument.Message>
,SignedArgument<MessageArgument.Message>
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final record
static class
static class
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final Collection<String>
private static final org.slf4j.Logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic MessageArgument.ChatMessage
getChatMessage
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_232164_, String p_232165_) static Component
getMessage
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_96836_, String p_96837_) getSignableText
(MessageArgument.Message p_242423_) (package private) static void
logResolutionFailure
(CommandSourceStack p_232156_, CompletableFuture<?> p_232157_) static MessageArgument
message()
parse
(com.mojang.brigadier.StringReader p_96834_) resolvePreview
(CommandSourceStack p_232147_, MessageArgument.Message p_232148_) 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
Methods inherited from interface net.minecraft.commands.arguments.PreviewedArgument
resolvePreview
-
Field Details
-
EXAMPLES
-
LOGGER
private static final org.slf4j.Logger LOGGER
-
-
Constructor Details
-
MessageArgument
public MessageArgument()
-
-
Method Details
-
message
-
getMessage
public static Component getMessage(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_96836_, String p_96837_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getChatMessage
public static MessageArgument.ChatMessage getChatMessage(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_232164_, String p_232165_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
parse
public MessageArgument.Message parse(com.mojang.brigadier.StringReader p_96834_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Specified by:
parse
in interfacecom.mojang.brigadier.arguments.ArgumentType<MessageArgument.Message>
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getExamples
- Specified by:
getExamples
in interfacecom.mojang.brigadier.arguments.ArgumentType<MessageArgument.Message>
-
getSignableText
- Specified by:
getSignableText
in interfaceSignedArgument<MessageArgument.Message>
-
resolvePreview
public CompletableFuture<Component> resolvePreview(CommandSourceStack p_232147_, MessageArgument.Message p_232148_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Specified by:
resolvePreview
in interfacePreviewedArgument<MessageArgument.Message>
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getValueType
- Specified by:
getValueType
in interfacePreviewedArgument<MessageArgument.Message>
-
logResolutionFailure
-