Class ColorScheme

java.lang.Object
com.djrapitops.plan.commands.use.ColorScheme
Direct Known Subclasses:
PlanColorScheme

public class ColorScheme extends Object
Class that contains ChatColors for plugins.

Colors should be defined in MineCraft format, eg. "§1" "§a" "§o§3"

  • Constructor Details

    • ColorScheme

      public ColorScheme(String... colors)
      Create a new ColorScheme.
      Parameters:
      colors - colors in MineCraft format, eg. "§1" "§a" "§o§3"
    • ColorScheme

      public ColorScheme(List<String> colors)
      Create a new ColorScheme.
      Parameters:
      colors - colors in MineCraft format, eg. "§1" "§a" "§o§3"
  • Method Details

    • getColor

      public String getColor(int i)
      Get a color with a particular index.
      Parameters:
      i - Index of the color.
      Returns:
      a color code, eg "§1" or empty string if index is out of bounds.
    • getMainColor

      public String getMainColor()
      Retrieve the first defined color.
      Returns:
      a color code, eg "§1" or empty string if index is out of bounds.
    • getSecondaryColor

      public String getSecondaryColor()
      Retrieve the second defined color.
      Returns:
      a color code, eg "§1" or empty string if index is out of bounds.
    • getTertiaryColor

      public String getTertiaryColor()
      Retrieve the third defined color.
      Returns:
      a color code, eg "§1" or empty string if index is out of bounds.
    • getExtraColor

      public String getExtraColor()
      Retrieve the fourth defined color.
      Returns:
      a color code, eg "§1" or empty string if index is out of bounds.