Class ComponentArgument

java.lang.Object
net.minecraft.commands.arguments.ComponentArgument
All Implemented Interfaces:
com.mojang.brigadier.arguments.ArgumentType<Component>

public class ComponentArgument extends Object implements com.mojang.brigadier.arguments.ArgumentType<Component>
  • Field Details

    • EXAMPLES

      private static final Collection<String> EXAMPLES
    • ERROR_INVALID_JSON

      public static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_INVALID_JSON
    • registries

      private final HolderLookup.Provider registries
  • Constructor Details

  • Method Details

    • getComponent

      public static Component getComponent(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_87118_, String p_87119_)
    • textComponent

      public static ComponentArgument textComponent(CommandBuildContext p_330669_)
    • parse

      public Component parse(com.mojang.brigadier.StringReader p_87116_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Specified by:
      parse in interface com.mojang.brigadier.arguments.ArgumentType<Component>
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getExamples

      public Collection<String> getExamples()
      Specified by:
      getExamples in interface com.mojang.brigadier.arguments.ArgumentType<Component>