summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorNathan Adams <dinnerbone@dinnerbone.com>2012-01-19 15:09:06 +0000
committerNathan Adams <dinnerbone@dinnerbone.com>2012-01-19 15:10:00 +0000
commit1f1c9c0d4b074fff3e21826a655b1b77adedf351 (patch)
tree75b2199fd5ba5bb2ef924cc2f9542cea853a2a52 /src/main/java
parent737cf284e33af978431b0443aa2cd43b2e10f6bc (diff)
downloadcraftbukkit-1f1c9c0d4b074fff3e21826a655b1b77adedf351.tar
craftbukkit-1f1c9c0d4b074fff3e21826a655b1b77adedf351.tar.gz
craftbukkit-1f1c9c0d4b074fff3e21826a655b1b77adedf351.tar.lz
craftbukkit-1f1c9c0d4b074fff3e21826a655b1b77adedf351.tar.xz
craftbukkit-1f1c9c0d4b074fff3e21826a655b1b77adedf351.zip
Correctly take in ChatColor length when limiting player list size. This should fix BUKKIT-571
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java4
1 files 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 e4f1b160..6aa39bca 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