mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-25 01:25:03 +01:00
SPIGOT-4016: Fix clearing custom names
By: md_5 <git@md-5.net>
This commit is contained in:
parent
ff8e4c9c8f
commit
9856b80c22
1 changed files with 1 additions and 5 deletions
|
@ -527,12 +527,8 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
|||
|
||||
@Override
|
||||
public void setCustomName(String name) {
|
||||
if (name == null) {
|
||||
name = "";
|
||||
}
|
||||
|
||||
// sane limit for name length
|
||||
if (name.length() > 256) {
|
||||
if (name != null && name.length() > 256) {
|
||||
name = name.substring(0, 256);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue