Add shorthand for getting Color int

Signed-off-by: Etzelia <etzelia@hotmail.com>
grief
Etzelia 2020-07-29 14:48:05 -05:00
parent 3494a28ac5
commit 57cd360753
No known key found for this signature in database
GPG Key ID: 3CAEB74806C4ADE5
2 changed files with 5 additions and 1 deletions

View File

@ -24,6 +24,10 @@ public enum Color {
return hex;
}
public int getInt() {
return hexToInt(hex);
}
public ChatColor getChatColor() {
return chatColor;
}

View File

@ -89,7 +89,7 @@ public class MainCommand implements CommandExecutor {
JsonArray embeds = new JsonArray();
JsonObject embed = new JsonObject();
embed.addProperty("color", Color.hexToInt("#3273dc"));
embed.addProperty("color", Color.PRIMARY.getInt());
embed.addProperty("description", "Test Message");
JsonObject author = new JsonObject();