From 1f1c9c0d4b074fff3e21826a655b1b77adedf351 Mon Sep 17 00:00:00 2001 From: Nathan Adams 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 --- src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index e4f1b160ef..6aa39bca69 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/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