Class ChatComponentArgument

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.md_5.bungee.api.chat.BaseComponent[]>
dev.jorel.commandapi.arguments.ChatComponentArgument
All Implemented Interfaces:
BukkitExecutable<Argument<net.md_5.bungee.api.chat.BaseComponent[]>>, ChainableBuilder<Argument<net.md_5.bungee.api.chat.BaseComponent[]>>, PlatformExecutable<Argument<net.md_5.bungee.api.chat.BaseComponent[]>,org.bukkit.command.CommandSender>

public class ChatComponentArgument extends Argument<net.md_5.bungee.api.chat.BaseComponent[]>
An argument that represents raw JSON text
Since:
1.5
API Note:
Returns a BaseComponent[] object
  • Field Details

  • Constructor Details

    • ChatComponentArgument

      public ChatComponentArgument(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.md_5.bungee.api.chat.BaseComponent[]> getPrimitiveType()
      Specified by:
      getPrimitiveType in class AbstractArgument<net.md_5.bungee.api.chat.BaseComponent[],Argument<net.md_5.bungee.api.chat.BaseComponent[]>,Argument<?>,org.bukkit.command.CommandSender>
    • getArgumentType

      public CommandAPIArgumentType getArgumentType()
      Specified by:
      getArgumentType in class AbstractArgument<net.md_5.bungee.api.chat.BaseComponent[],Argument<net.md_5.bungee.api.chat.BaseComponent[]>,Argument<?>,org.bukkit.command.CommandSender>
    • parseArgument

      public <CommandSourceStack> net.md_5.bungee.api.chat.BaseComponent[] 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.md_5.bungee.api.chat.BaseComponent[],Argument<net.md_5.bungee.api.chat.BaseComponent[]>,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.md_5.bungee.api.chat.BaseComponent[]> clearExecutors()