Fix player disguise no name visible not loading properly

This commit is contained in:
libraryaddict 2021-02-06 16:20:03 +13:00
parent 404974732f
commit 76e7151488
2 changed files with 6 additions and 2 deletions

View File

@ -368,8 +368,8 @@ public abstract class Disguise {
if (isDynamicName()) { if (isDynamicName()) {
String name = getEntity().getCustomName(); String name = getEntity().getCustomName();
if (name == null) { if (name == null || name.isEmpty()) {
name = ""; name = isPlayerDisguise() ? "LD_NoName" : "";
} }
if (isPlayerDisguise()) { if (isPlayerDisguise()) {

View File

@ -307,6 +307,10 @@ public class PlayerDisguise extends TargetedDisguise {
name = DisguiseUtilities.getDisplayName(name); name = DisguiseUtilities.getDisplayName(name);
} }
if (name.equals("")) {
name = "LD_NoName";
}
if (name.equals(playerName)) { if (name.equals(playerName)) {
return; return;
} }