Class AdventureChatColorArgument

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<T>
dev.jorel.commandapi.arguments.SafeOverrideableArgument<net.kyori.adventure.text.format.NamedTextColor,net.kyori.adventure.text.format.NamedTextColor>
dev.jorel.commandapi.arguments.AdventureChatColorArgument
All Implemented Interfaces:
SafeOverrideable<net.kyori.adventure.text.format.NamedTextColor,net.kyori.adventure.text.format.NamedTextColor,Argument<net.kyori.adventure.text.format.NamedTextColor>,Argument<?>,org.bukkit.command.CommandSender>, BukkitExecutable<Argument<net.kyori.adventure.text.format.NamedTextColor>>, ChainableBuilder<Argument<net.kyori.adventure.text.format.NamedTextColor>>, PlatformExecutable<Argument<net.kyori.adventure.text.format.NamedTextColor>,org.bukkit.command.CommandSender>

public class AdventureChatColorArgument extends SafeOverrideableArgument<net.kyori.adventure.text.format.NamedTextColor,net.kyori.adventure.text.format.NamedTextColor>
An argument that represents the Bukkit ChatColor object
Since:
1.1
API Note:
Returns a ChatColor object
  • Field Details

  • Constructor Details

    • AdventureChatColorArgument

      public AdventureChatColorArgument(String nodeName)
      Constructs a ChatColor argument with a given node name. Represents a color or formatting for chat
      Parameters:
      nodeName - the name of the node for argument
  • Method Details

    • getPrimitiveType

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

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

      public <CommandSourceStack> net.kyori.adventure.text.format.NamedTextColor 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.format.NamedTextColor,Argument<net.kyori.adventure.text.format.NamedTextColor>,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.format.NamedTextColor> clearExecutors()