Class ComponentArgument

All Implemented Interfaces:
com.mojang.brigadier.arguments.ArgumentType<Component>

public class ComponentArgument extends ParserBasedArgument<Component>
  • Field Details

    • EXAMPLES

      private static final Collection<String> EXAMPLES
    • ERROR_INVALID_COMPONENT

      public static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_INVALID_COMPONENT
    • OPS

      private static final com.mojang.serialization.DynamicOps<Tag> OPS
    • TAG_PARSER

      private static final CommandArgumentParser<Tag> TAG_PARSER
  • Constructor Details

  • 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

      public static ComponentArgument textComponent(CommandBuildContext p_324401_)
    • getExamples

      public Collection<String> getExamples()