From b6a757dec87043268807b45769b77fd0cb981962 Mon Sep 17 00:00:00 2001 From: md_5 Date: Mon, 16 Jul 2018 14:39:01 +1000 Subject: [PATCH] SPIGOT-4016: Fix clearing custom names --- .../java/org/bukkit/craftbukkit/entity/CraftEntity.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java index f0a52de5bd..576567774e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -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); }