Class NamedColorArgument<C>

java.lang.Object
cloud.commandframework.arguments.CommandArgument<C,net.minecraft.ChatFormatting>
cloud.commandframework.fabric.argument.NamedColorArgument<C>
Type Parameters:
C - the sender type
All Implemented Interfaces:
cloud.commandframework.keys.CloudKeyHolder<net.minecraft.ChatFormatting>, Comparable<cloud.commandframework.arguments.CommandArgument<?,?>>

public final class NamedColorArgument<C> extends cloud.commandframework.arguments.CommandArgument<C,net.minecraft.ChatFormatting>
An argument for named colors in the ChatFormatting enum.
Since:
1.5.0
  • Method Details

    • builder

      public static <C> @NonNull NamedColorArgument.Builder<C> builder(@NonNull String name)
      Type Parameters:
      C - Command sender type
      Parameters:
      name - Name of the component
      Returns:
      Created builder
      Since:
      1.5.0
    • of

      public static <C> @NonNull NamedColorArgument<C> of(@NonNull String name)
      Create a new required NamedColorArgument.
      Type Parameters:
      C - Command sender type
      Parameters:
      name - Component name
      Returns:
      Created component
      Since:
      1.5.0
    • optional

      public static <C> @NonNull NamedColorArgument<C> optional(@NonNull String name)
      Create a new optional NamedColorArgument.
      Type Parameters:
      C - Command sender type
      Parameters:
      name - Component name
      Returns:
      Created component
      Since:
      1.5.0
    • optional

      public static <C> @NonNull NamedColorArgument<C> optional(@NonNull String name, @NonNull net.minecraft.ChatFormatting defaultColor)
      Create a new optional NamedColorArgument with the specified default value.
      Type Parameters:
      C - Command sender type
      Parameters:
      name - Component name
      defaultColor - Default colour, must be a color
      Returns:
      Created component
      Since:
      1.5.0