Enum Class McFormat

java.lang.Object
java.lang.Enum<McFormat>
com.marcpg.libpg.color.McFormat
All Implemented Interfaces:
Serializable, Comparable<McFormat>, Constable

public enum McFormat extends Enum<McFormat>
Since:
0.0.1
  • Enum Constant Details

    • RESET

      public static final McFormat RESET
      Reset the color to the default one
    • MAGIC

      public static final McFormat MAGIC
      Makes the text constantly change
    • BOLD

      public static final McFormat BOLD
      Bold
    • ITALIC

      public static final McFormat ITALIC
      Italic
    • STRIKETHROUGH

      public static final McFormat STRIKETHROUGH
      Strikethrough
    • UNDERLINED

      public static final McFormat UNDERLINED
      Underlined
    • DARK_RED

      public static final McFormat DARK_RED
      Dark Red
    • RED

      public static final McFormat RED
      Light Red
    • GOLD

      public static final McFormat GOLD
      Gold / Orange
    • YELLOW

      public static final McFormat YELLOW
      Yellow
    • GREEN

      public static final McFormat GREEN
      Dark Green
    • LIME

      public static final McFormat LIME
      Light Green / Lime
    • AQUA

      public static final McFormat AQUA
      Light Aqua
    • DARK_AQUA

      public static final McFormat DARK_AQUA
      Dark Aqua
    • DARK_BLUE

      public static final McFormat DARK_BLUE
      Dark Blue
    • BLUE

      public static final McFormat BLUE
      Light Blue
    • PINK

      public static final McFormat PINK
      Light Pink
    • PURPLE

      public static final McFormat PURPLE
      Purple / Magenta
    • WHITE

      public static final McFormat WHITE
      White
    • GRAY

      public static final McFormat GRAY
      Light Gray
    • DARK_GRAY

      public static final McFormat DARK_GRAY
      Dark Gray
    • BLACK

      public static final McFormat BLACK
      Black
    • MINECOIN_GOLD

      public static final McFormat MINECOIN_GOLD
      Minecoin Color
    • MATERIAL_QUARTZ

      public static final McFormat MATERIAL_QUARTZ
      Quartz Color
    • MATERIAL_IRON

      public static final McFormat MATERIAL_IRON
      Iron Color
    • MATERIAL_NETHERITE

      public static final McFormat MATERIAL_NETHERITE
      Netherite Color
    • MATERIAL_REDSTONE

      public static final McFormat MATERIAL_REDSTONE
      Redstone Color
    • MATERIAL_COPPER

      public static final McFormat MATERIAL_COPPER
      Copper Color
    • MATERIAL_GOLD

      public static final McFormat MATERIAL_GOLD
      Gold Color
    • MATERIAL_EMERALD

      public static final McFormat MATERIAL_EMERALD
      Emerald Color
    • MATERIAL_DIAMOND

      public static final McFormat MATERIAL_DIAMOND
      Diamond Color
    • MATERIAL_LAPIS

      public static final McFormat MATERIAL_LAPIS
      Lapislazuli Color
    • MATERIAL_AMETHYST

      public static final McFormat MATERIAL_AMETHYST
      Amethyst Color
  • Field Details

    • code

      public final char code
      The Minecraft color code
    • hex

      public final String hex
      The color's hexadecimal code
    • java

      public final boolean java
      If the color can be used in Minecraft: Java Edition
    • bedrock

      public final boolean bedrock
      If the color can be used in Minecraft: Bedrock Edition
    • ansiCode

      public final Integer ansiCode
      The ANSI escape code
  • Method Details

    • values

      public static McFormat[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static McFormat valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • chatColor

      @NotNull public @NotNull String chatColor()
      Get the color as a Minecraft chat color. Similar to Bukkit/BungeeCord's ChatColor
      Returns:
      § + the code, so you can use it in text.
      Since:
      0.0.1
    • awtColor

      @NotNull public @NotNull Color awtColor()
      Get the color's equivalent Java AWT color.
      Returns:
      Equivalent Java AWT color
      Since:
      0.0.1
    • ansi

      @NotNull public @NotNull String ansi()
      Get the color's equivalent ANSI escape code.
      Returns:
      Equivalent ANSI escape code
      Since:
      0.0.1
    • consoleAnsi

      @NotNull public @NotNull String consoleAnsi()
      Get the color's equivalent console ANSI escape code that can be used to format the console.
      Returns:
      Equivalent console ANSI escape code
      Since:
      0.0.1
    • toString

      @NotNull public @NotNull String toString()
      Does the same as chatColor(), just there so you can just use McFormat.COLOR without the chatColor()
      Overrides:
      toString in class Enum<McFormat>
      Returns:
      § + the code, so you can use it in text
      Since:
      0.0.1