diff --git a/src/main/java/me/libraryaddict/disguise/disguisetypes/PlayerDisguise.java b/src/main/java/me/libraryaddict/disguise/disguisetypes/PlayerDisguise.java index e2f0cc7e..85bb1715 100644 --- a/src/main/java/me/libraryaddict/disguise/disguisetypes/PlayerDisguise.java +++ b/src/main/java/me/libraryaddict/disguise/disguisetypes/PlayerDisguise.java @@ -113,7 +113,7 @@ public class PlayerDisguise extends TargetedDisguise { } if (scoreboardName == null) { - if (isUpsideDown() || isDeadmau5Ears() || !isNameVisible()) { + if (isUpsideDown() || isDeadmau5Ears()) { scoreboardName = new DisguiseUtilities.DScoreTeam(this, new String[]{"", getProfileName(), ""}); } else { scoreboardName = DisguiseUtilities.createExtendedName(this); @@ -147,8 +147,7 @@ public class PlayerDisguise extends TargetedDisguise { * The actual name that'll be sent in the game profile, not the name that they're known as */ public String getProfileName() { - return isUpsideDown() ? "Dinnerbone" : isDeadmau5Ears() ? "deadmau5" : - !isNameVisible() || getName().isEmpty() ? "LD_NoName" : hasScoreboardName() ? getScoreboardName().getPlayer() : getName(); + return isUpsideDown() ? "Dinnerbone" : isDeadmau5Ears() ? "deadmau5" : hasScoreboardName() ? getScoreboardName().getPlayer() : getName(); } public UUID getUUID() { @@ -214,10 +213,6 @@ public class PlayerDisguise extends TargetedDisguise { getWatcher().setInternalUpsideDown(upsideDown); - if (gameProfile != null) { - gameProfile = ReflectionManager.getGameProfileWithThisSkin(uuid, getProfileName(), getGameProfile()); - } - if (isDisguiseInUse()) { resendDisguise(DisguiseConfig.isArmorstandsName() ? getName() : "Dinnerbone", true); } else { @@ -234,10 +229,6 @@ public class PlayerDisguise extends TargetedDisguise { this.deadmau5Ears = deadmau5Ears; - if (gameProfile != null) { - gameProfile = ReflectionManager.getGameProfileWithThisSkin(uuid, getProfileName(), getGameProfile()); - } - if (isDisguiseInUse()) { resendDisguise(DisguiseConfig.isArmorstandsName() ? getName() : "deadmau5", true); } else { diff --git a/src/main/java/me/libraryaddict/disguise/utilities/DisguiseUtilities.java b/src/main/java/me/libraryaddict/disguise/utilities/DisguiseUtilities.java index 696e6dc4..25d3fcd8 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/DisguiseUtilities.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/DisguiseUtilities.java @@ -105,7 +105,7 @@ public class DisguiseUtilities { } public void handleTeam(Scoreboard board, boolean nameVisible) { - nameVisible = !getPlayer().equals("LD_NoName") && !DisguiseConfig.isArmorstandsName() && nameVisible; + nameVisible = !DisguiseConfig.isArmorstandsName() && nameVisible; Team team = board.getTeam(getTeamName()); if (team == null) { @@ -1775,9 +1775,9 @@ public class DisguiseUtilities { if (mainTeam == null) { mainTeam = scoreboard.registerNewTeam("LD_NoName"); mainTeam.setOption(Option.NAME_TAG_VISIBILITY, OptionStatus.NEVER); - mainTeam.addEntry("LD_NoName"); - } else if (!mainTeam.hasEntry("LD_NoName")) { - mainTeam.addEntry("LD_NoName"); + mainTeam.addEntry(""); + } else if (!mainTeam.hasEntry("")) { + mainTeam.addEntry(""); } } diff --git a/src/main/java/me/libraryaddict/disguise/utilities/packets/packethandlers/PacketHandlerSpawn.java b/src/main/java/me/libraryaddict/disguise/utilities/packets/packethandlers/PacketHandlerSpawn.java index f336feaf..ebc226b7 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/packets/packethandlers/PacketHandlerSpawn.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/packets/packethandlers/PacketHandlerSpawn.java @@ -163,11 +163,10 @@ public class PacketHandlerSpawn implements IPacketHandler { mods.write(5, pitch); } else if (disguise.getType().isPlayer()) { PlayerDisguise playerDisguise = (PlayerDisguise) disguise; - boolean visibleOrNewCompat = playerDisguise.isNameVisible() && DisguiseConfig.isScoreboardNames(); + boolean visibleOrNewCompat = playerDisguise.isNameVisible() || DisguiseConfig.isScoreboardNames(); WrappedGameProfile spawnProfile = visibleOrNewCompat ? playerDisguise.getGameProfile() : ReflectionManager - .getGameProfileWithThisSkin(UUID.randomUUID(), playerDisguise.isNameVisible() ? playerDisguise.getProfileName() : "LD_NoName", - playerDisguise.getGameProfile()); + .getGameProfileWithThisSkin(UUID.randomUUID(), playerDisguise.isNameVisible() ? playerDisguise.getName() : "", playerDisguise.getGameProfile()); int entityId = disguisedEntity.getEntityId(); PlayerSkinHandler.PlayerSkin skin;