mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-30 04:02:50 +01:00
Limit mob names to 64 chars to avoid client crash. Fixes BUKKIT-3753
This commit is contained in:
parent
4fa8c24e42
commit
7466321212
1 changed files with 5 additions and 0 deletions
|
@ -362,6 +362,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
|||
name = "";
|
||||
}
|
||||
|
||||
// Names cannot be more than 64 characters due to DataWatcher limitations
|
||||
if (name.length() > 64) {
|
||||
name = name.substring(0, 64);
|
||||
}
|
||||
|
||||
getHandle().setCustomName(name);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue