From 4788c81270e9cf71b98847d3038da8ab577639ba Mon Sep 17 00:00:00 2001 From: NorbiPeti Date: Sat, 1 Jul 2017 01:20:51 +0200 Subject: [PATCH] Added color codes to Colors enum --- .../java/buttondevteam/lib/chat/Color.java | 32 +++++++++++++++---- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/src/main/java/buttondevteam/lib/chat/Color.java b/src/main/java/buttondevteam/lib/chat/Color.java index 7849f98..864ba9e 100644 --- a/src/main/java/buttondevteam/lib/chat/Color.java +++ b/src/main/java/buttondevteam/lib/chat/Color.java @@ -1,19 +1,39 @@ package buttondevteam.lib.chat; public enum Color implements TellrawSerializableEnum { - Black("black"), DarkBlue("dark_blue"), DarkGreen("dark_green"), DarkAqua("dark_aqua"), DarkRed( - "dark_red"), DarkPurple("dark_purple"), Gold("gold"), Gray("gray"), DarkGray("dark_gray"), Blue( - "blue"), Green("green"), Aqua("aqua"), Red( - "red"), LightPurple("light_purple"), Yellow("yellow"), White("white"), RPC("rpc"); + Black("black", 0, 0, 0), DarkBlue("dark_blue", 0, 0, 170), DarkGreen("dark_green", 0, 170, 0), DarkAqua("dark_aqua", + 0, 170, 170), DarkRed("dark_red", 170, 0, 0), DarkPurple("dark_purple", 0, 170, 0), Gold("gold", 255, 170, + 0), Gray("gray", 170, 170, 170), DarkGray("dark_gray", 85, 85, 85), Blue("blue", 85, 85, + 255), Green("green", 85, 255, 85), Aqua("aqua", 85, 255, 255), Red("red", 255, 85, + 85), LightPurple("light_purple", 255, 85, 255), Yellow("yellow", 255, 255, + 85), White("white", 255, 255, 255), RPC("rpc", 0, 0, 0); - private String name; + private final String name; + private final int red; + private final int green; + private final int blue; - Color(String name) { + Color(String name, int red, int green, int blue) { this.name = name; + this.red = red; + this.green = green; + this.blue = blue; } @Override public String getName() { return name; } + + public int getRed() { + return red; + } + + public int getGreen() { + return green; + } + + public int getBlue() { + return blue; + } } \ No newline at end of file