23 lines
574 B
Java
23 lines
574 B
Java
package xyz.etztech.minealert;
|
|
|
|
import net.md_5.bungee.api.ChatColor;
|
|
|
|
public class Color {
|
|
public static ChatColor DEFAULT = ChatColor.GRAY;
|
|
public static ChatColor ERROR = ChatColor.of("#f14668");
|
|
public static ChatColor INFO = ChatColor.of("#3298dc");
|
|
public static ChatColor PRIMARY = ChatColor.of("#3273dc");
|
|
|
|
public static int hexToInt(String hex) {
|
|
if (hex.startsWith("#")) {
|
|
hex = hex.substring(1);
|
|
}
|
|
|
|
if (hex.length() != 6) {
|
|
return 0;
|
|
}
|
|
|
|
return Integer.parseInt(hex, 16);
|
|
}
|
|
}
|