Class ChatColorArgument

java.lang.Object
dev.jorel.commandapi.AbstractArgumentTree<dev.jorel.commandapi.arguments.Argument<net.kyori.adventure.text.format.NamedTextColor>, dev.jorel.commandapi.arguments.Argument<?>, org.bukkit.command.CommandSender>
dev.jorel.commandapi.arguments.AbstractArgument<net.kyori.adventure.text.format.NamedTextColor, dev.jorel.commandapi.arguments.Argument<net.kyori.adventure.text.format.NamedTextColor>, dev.jorel.commandapi.arguments.Argument<?>, org.bukkit.command.CommandSender>
dev.jorel.commandapi.arguments.Argument<net.kyori.adventure.text.format.NamedTextColor>
dev.jorel.commandapi.arguments.SafeOverrideableArgument<net.kyori.adventure.text.format.NamedTextColor, net.kyori.adventure.text.format.NamedTextColor>
dev.jorel.commandapi.arguments.ChatColorArgument
All Implemented Interfaces:
dev.jorel.commandapi.arguments.SafeOverrideable<net.kyori.adventure.text.format.NamedTextColor, net.kyori.adventure.text.format.NamedTextColor, dev.jorel.commandapi.arguments.Argument<net.kyori.adventure.text.format.NamedTextColor>, dev.jorel.commandapi.arguments.Argument<?>, org.bukkit.command.CommandSender>, dev.jorel.commandapi.BukkitExecutable<dev.jorel.commandapi.arguments.Argument<net.kyori.adventure.text.format.NamedTextColor>>, dev.jorel.commandapi.ChainableBuilder<dev.jorel.commandapi.arguments.Argument<net.kyori.adventure.text.format.NamedTextColor>>, dev.jorel.commandapi.PlatformExecutable<dev.jorel.commandapi.arguments.Argument<net.kyori.adventure.text.format.NamedTextColor>, org.bukkit.command.CommandSender>

public class ChatColorArgument extends dev.jorel.commandapi.arguments.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 Summary

    Fields
    Modifier and Type
    Field
    Description
    protected dev.jorel.commandapi.CommandAPIExecutor<org.bukkit.command.CommandSender, dev.jorel.commandapi.commandsenders.AbstractCommandSender<? extends org.bukkit.command.CommandSender>>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a ChatColor argument with a given node name.
  • Method Summary

    Modifier and Type
    Method
    Description
    dev.jorel.commandapi.arguments.Argument<net.kyori.adventure.text.format.NamedTextColor>
     
    dev.jorel.commandapi.arguments.CommandAPIArgumentType
     
    dev.jorel.commandapi.CommandAPIExecutor<org.bukkit.command.CommandSender, dev.jorel.commandapi.commandsenders.AbstractCommandSender<? extends org.bukkit.command.CommandSender>>
     
    Class<net.kyori.adventure.text.format.NamedTextColor>
     
    <CommandSourceStack>
    net.kyori.adventure.text.format.NamedTextColor
    parseArgument(com.mojang.brigadier.context.CommandContext<CommandSourceStack> cmdCtx, String key, dev.jorel.commandapi.executors.CommandArguments previousArgs)
     
    void
    setExecutor(dev.jorel.commandapi.CommandAPIExecutor<org.bukkit.command.CommandSender, dev.jorel.commandapi.commandsenders.AbstractCommandSender<? extends org.bukkit.command.CommandSender>> arg0)
     

    Methods inherited from class dev.jorel.commandapi.arguments.SafeOverrideableArgument

    fromKey, getMapper

    Methods inherited from class dev.jorel.commandapi.arguments.Argument

    instance

    Methods inherited from class dev.jorel.commandapi.arguments.AbstractArgument

    combineWith, copyPermissionsAndRequirements, getArgumentPermission, getCombinedArguments, getEntityNames, getHelpString, getIncludedSuggestions, getNodeName, getOverriddenSuggestions, getRawType, getRawTypeSupplier, getRequirements, hasCombinedArguments, includeSuggestions, isListed, isOptional, replaceSuggestions, setListed, setOptional, toString, withPermission, withPermission, withRequirement

    Methods inherited from class dev.jorel.commandapi.AbstractArgumentTree

    then, thenNested, thenNested

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface dev.jorel.commandapi.BukkitExecutable

    executes, executes, executes, executes, executesCommandBlock, executesCommandBlock, executesCommandBlock, executesCommandBlock, executesConsole, executesConsole, executesConsole, executesConsole, executesEntity, executesEntity, executesEntity, executesEntity, executesFeedbackForwarding, executesFeedbackForwarding, executesFeedbackForwarding, executesFeedbackForwarding, executesNative, executesNative, executesNative, executesNative, executesPlayer, executesPlayer, executesPlayer, executesPlayer, executesProxy, executesProxy, executesProxy, executesProxy, executesRemoteConsole, executesRemoteConsole, executesRemoteConsole, executesRemoteConsole

    Methods inherited from interface dev.jorel.commandapi.ChainableBuilder

    instance

    Methods inherited from interface dev.jorel.commandapi.PlatformExecutable

    getExecutor

    Methods inherited from interface dev.jorel.commandapi.arguments.SafeOverrideable

    includeSafeSuggestions, includeSuggestions, replaceSafeSuggestions, replaceSuggestions
  • Field Details

    • executor

      protected dev.jorel.commandapi.CommandAPIExecutor<org.bukkit.command.CommandSender, dev.jorel.commandapi.commandsenders.AbstractCommandSender<? extends org.bukkit.command.CommandSender>> executor
  • Constructor Details

    • ChatColorArgument

      public ChatColorArgument(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 dev.jorel.commandapi.arguments.AbstractArgument<net.kyori.adventure.text.format.NamedTextColor, dev.jorel.commandapi.arguments.Argument<net.kyori.adventure.text.format.NamedTextColor>, dev.jorel.commandapi.arguments.Argument<?>, org.bukkit.command.CommandSender>
    • getArgumentType

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

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

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

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

      public dev.jorel.commandapi.arguments.Argument<net.kyori.adventure.text.format.NamedTextColor> clearExecutors()