mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 11:44:19 +01:00
Correctly take in ChatColor length when limiting player list size. This should fix BUKKIT-571
By: Nathan Adams <dinnerbone@dinnerbone.com>
This commit is contained in:
parent
179363588e
commit
0579af1ac0
1 changed files with 2 additions and 2 deletions
|
@ -148,8 +148,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ChatColor.stripColor(name).length() > 16) {
|
if (name.length() > 16) {
|
||||||
throw new IllegalArgumentException("Player list names can only be a maximum of 16 characters long without colour codes");
|
throw new IllegalArgumentException("Player list names can only be a maximum of 16 characters long");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Collisions will make for invisible people
|
// Collisions will make for invisible people
|
||||||
|
|
Loading…
Reference in a new issue