Class NamedColorParser<C>

java.lang.Object
org.incendo.cloud.brigadier.parser.WrappedBrigadierParser<C, net.minecraft.ChatFormatting>
org.incendo.cloud.minecraft.modded.parser.NamedColorParser<C>
Type Parameters:
C - the sender type
All Implemented Interfaces:
ArgumentParser<C, net.minecraft.ChatFormatting>, SuggestionProvider<C>, SuggestionProviderHolder<C>

public final class NamedColorParser<C> extends WrappedBrigadierParser<C, net.minecraft.ChatFormatting>
An argument for named colors in the ChatFormatting enum.
  • Method Details

    • namedColorParser

      public static <C> @NonNull ParserDescriptor<C, net.minecraft.ChatFormatting> namedColorParser()
      Creates a new named color parser.
      Type Parameters:
      C - command sender type
      Returns:
      the created parser
    • namedColorComponent

      public static <C> @NonNull CommandComponent.Builder<C, net.minecraft.ChatFormatting> namedColorComponent()
      Returns a CommandComponent.Builder using namedColorParser() as the parser.
      Type Parameters:
      C - the command sender type
      Returns:
      the component builder