public class Colors
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static java.util.Map<java.lang.String,org.bukkit.Color> |
COLOR_MAP
A map of all default dye colors.
|
private static java.util.List<org.bukkit.Color> |
COLORS
A list of all default dye colors.
|
private static java.util.Map<org.bukkit.ChatColor,net.kyori.adventure.text.format.NamedTextColor> |
COMPONENT_COLOR_MAP
A map of all named component colors, indexed by chat colors.
|
Constructor and Description |
---|
Colors() |
Modifier and Type | Method and Description |
---|---|
static net.kyori.adventure.text.format.NamedTextColor |
getByChatColor(org.bukkit.ChatColor color)
Gets the named component color for the given chat color.
|
static org.bukkit.Color |
getByName(java.lang.String name)
Gets the color with the given name.
|
static org.bukkit.Color |
getRandom()
Gets a random color.
|
private static final java.util.Map<org.bukkit.ChatColor,net.kyori.adventure.text.format.NamedTextColor> COMPONENT_COLOR_MAP
private static final java.util.Map<java.lang.String,org.bukkit.Color> COLOR_MAP
private static final java.util.List<org.bukkit.Color> COLORS
public static net.kyori.adventure.text.format.NamedTextColor getByChatColor(org.bukkit.ChatColor color)
color
- The associated chat color.public static org.bukkit.Color getByName(java.lang.String name)
name
- The name of the color.public static org.bukkit.Color getRandom()