Merge pull request #83 from Archy-X/master

Add ChatColor values method
This commit is contained in:
TheMode 2020-12-28 08:06:13 +01:00 committed by GitHub
commit c478bd7af6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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<ChatColor> values() {
return colorCode.values();
}
public boolean isEmpty() {
return empty;
}