From a16deb269a1f4553d9277ee998f71be67b89f74a Mon Sep 17 00:00:00 2001 From: rtm516 Date: Tue, 7 Jul 2020 15:09:24 +0100 Subject: [PATCH] Fix exact color matches not being formatted correctly (Fixes #912) --- .../main/java/org/geysermc/connector/utils/MessageUtils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/connector/src/main/java/org/geysermc/connector/utils/MessageUtils.java b/connector/src/main/java/org/geysermc/connector/utils/MessageUtils.java index bf1962246..44536ccf6 100644 --- a/connector/src/main/java/org/geysermc/connector/utils/MessageUtils.java +++ b/connector/src/main/java/org/geysermc/connector/utils/MessageUtils.java @@ -391,7 +391,8 @@ public class MessageUtils { for (Map.Entry testColor : COLORS.entrySet()) { if (testColor.getValue() == rgb) { - return testColor.getKey(); + closest = testColor.getKey(); + break; } int testR = (testColor.getValue() >> 16) & 0xFF;