From 0579af1ac0915eefef67657c82e1e1f8642faf8c Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Thu, 19 Jan 2012 15:09:06 +0000 Subject: [PATCH] Correctly take in ChatColor length when limiting player list size. This should fix BUKKIT-571 By: Nathan Adams --- .../main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index e4f1b160ef..6aa39bca69 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -148,8 +148,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return; } - if (ChatColor.stripColor(name).length() > 16) { - throw new IllegalArgumentException("Player list names can only be a maximum of 16 characters long without colour codes"); + if (name.length() > 16) { + throw new IllegalArgumentException("Player list names can only be a maximum of 16 characters long"); } // Collisions will make for invisible people