Class AdventureChatComponentArgument

java.lang.Object
dev.jorel.commandapi.AbstractArgumentTree<Impl,Argument,CommandSender>
dev.jorel.commandapi.arguments.AbstractArgument<T,Argument<T>,Argument<?>,org.bukkit.command.CommandSender>
dev.jorel.commandapi.arguments.Argument<net.kyori.adventure.text.Component>
dev.jorel.commandapi.arguments.AdventureChatComponentArgument
All Implemented Interfaces:
BukkitExecutable<Argument<net.kyori.adventure.text.Component>>, ChainableBuilder<Argument<net.kyori.adventure.text.Component>>, PlatformExecutable<Argument<net.kyori.adventure.text.Component>,org.bukkit.command.CommandSender>

public class AdventureChatComponentArgument extends Argument<net.kyori.adventure.text.Component>
An argument that represents raw JSON text
Since:
5.10
API Note:
Returns a Component object
  • Field Details

  • Constructor Details

    • AdventureChatComponentArgument

      public AdventureChatComponentArgument(String nodeName)
      Constructs a ChatComponent argument with a given node name. Represents raw JSON text, used in Book MetaData, Chat and other various areas of Minecraft
      Parameters:
      nodeName - the name of the node for argument
      See Also:
  • Method Details

    • getPrimitiveType

      public Class<net.kyori.adventure.text.Component> getPrimitiveType()
      Specified by:
      getPrimitiveType in class AbstractArgument<net.kyori.adventure.text.Component,Argument<net.kyori.adventure.text.Component>,Argument<?>,org.bukkit.command.CommandSender>
    • getArgumentType

      public CommandAPIArgumentType getArgumentType()
      Specified by:
      getArgumentType in class AbstractArgument<net.kyori.adventure.text.Component,Argument<net.kyori.adventure.text.Component>,Argument<?>,org.bukkit.command.CommandSender>
    • parseArgument

      public <CommandSourceStack> net.kyori.adventure.text.Component parseArgument(com.mojang.brigadier.context.CommandContext<CommandSourceStack> cmdCtx, String key, CommandArguments previousArgs) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Specified by:
      parseArgument in class AbstractArgument<net.kyori.adventure.text.Component,Argument<net.kyori.adventure.text.Component>,Argument<?>,org.bukkit.command.CommandSender>
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getExecutor

      public CommandAPIExecutor<org.bukkit.command.CommandSender,AbstractCommandSender<? extends org.bukkit.command.CommandSender>> getExecutor()
    • setExecutor

      public void setExecutor(CommandAPIExecutor<org.bukkit.command.CommandSender,AbstractCommandSender<? extends org.bukkit.command.CommandSender>> arg0)
    • clearExecutors

      public Argument<net.kyori.adventure.text.Component> clearExecutors()