From 05f376004401757223800aa61e9a97cf5cab4100 Mon Sep 17 00:00:00 2001 From: Archy-X Date: Mon, 28 Dec 2020 00:00:47 -0700 Subject: [PATCH] Added ChatColor values method --- src/main/java/net/minestom/server/chat/ChatColor.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/net/minestom/server/chat/ChatColor.java b/src/main/java/net/minestom/server/chat/ChatColor.java index 60b6f935c..d2bf99a86 100644 --- a/src/main/java/net/minestom/server/chat/ChatColor.java +++ b/src/main/java/net/minestom/server/chat/ChatColor.java @@ -8,6 +8,7 @@ import net.minestom.server.utils.validate.Check; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import java.util.Collection; import java.util.HashMap; import java.util.Map; @@ -199,6 +200,15 @@ public final class ChatColor { return legacyColorCodesMap.getOrDefault(colorCode, NO_COLOR); } + /** + * Gets a collection of all chat colors + * @return a collection of all chat colors + */ + @NotNull + public static Collection values() { + return colorCode.values(); + } + public boolean isEmpty() { return empty; }