From 840b522a985b230cf6ecbed0ec8256893077b60f Mon Sep 17 00:00:00 2001 From: NorbiPeti Date: Thu, 23 Nov 2017 21:35:14 +0100 Subject: [PATCH] It was my greatest enemy, *parenthesis* ...or the lack of them anyways: Finally found what was causing the exceptions --- src/main/java/buttondevteam/chat/ChatProcessing.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/buttondevteam/chat/ChatProcessing.java b/src/main/java/buttondevteam/chat/ChatProcessing.java index 55c8aa9..26f46a7 100644 --- a/src/main/java/buttondevteam/chat/ChatProcessing.java +++ b/src/main/java/buttondevteam/chat/ChatProcessing.java @@ -269,7 +269,7 @@ public class ChatProcessing { int len = name.length() / clrs.length; val nclar = ChatPlayer.getPlayer(player.getUniqueId(), ChatPlayer.class).NameColorLocations().get(); int[] ncl = nclar == null ? null : nclar.stream().mapToInt(Integer::intValue).toArray(); - if (ncl != null && Arrays.stream(ncl).sum() != name.length() || ncl.length != clrs.length) + if (ncl != null && (Arrays.stream(ncl).sum() != name.length() || ncl.length != clrs.length)) ncl = null; // Reset if name length changed if (name.charAt(0) == '~') { // Ignore ~ in nicknames prevlen.incrementAndGet();