It was my greatest enemy, *parenthesis*

...or the lack of them anyways:
Finally found what was causing the exceptions
This commit is contained in:
Norbi Peti 2017-11-23 21:35:14 +01:00
parent 5a217fcb70
commit 840b522a98

View file

@ -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();