Revert "" to "LD_NoName"
This commit is contained in:
parent
38117d9f59
commit
25f6ac8b1e
@ -113,7 +113,7 @@ public class PlayerDisguise extends TargetedDisguise {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (scoreboardName == null) {
|
if (scoreboardName == null) {
|
||||||
if (isUpsideDown() || isDeadmau5Ears() || !isNameVisible()) {
|
if (isUpsideDown() || isDeadmau5Ears()) {
|
||||||
scoreboardName = new DisguiseUtilities.DScoreTeam(this, new String[]{"", getProfileName(), ""});
|
scoreboardName = new DisguiseUtilities.DScoreTeam(this, new String[]{"", getProfileName(), ""});
|
||||||
} else {
|
} else {
|
||||||
scoreboardName = DisguiseUtilities.createExtendedName(this);
|
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
|
* The actual name that'll be sent in the game profile, not the name that they're known as
|
||||||
*/
|
*/
|
||||||
public String getProfileName() {
|
public String getProfileName() {
|
||||||
return isUpsideDown() ? "Dinnerbone" : isDeadmau5Ears() ? "deadmau5" :
|
return isUpsideDown() ? "Dinnerbone" : isDeadmau5Ears() ? "deadmau5" : hasScoreboardName() ? getScoreboardName().getPlayer() : getName();
|
||||||
!isNameVisible() || getName().isEmpty() ? "LD_NoName" : hasScoreboardName() ? getScoreboardName().getPlayer() : getName();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public UUID getUUID() {
|
public UUID getUUID() {
|
||||||
@ -214,10 +213,6 @@ public class PlayerDisguise extends TargetedDisguise {
|
|||||||
|
|
||||||
getWatcher().setInternalUpsideDown(upsideDown);
|
getWatcher().setInternalUpsideDown(upsideDown);
|
||||||
|
|
||||||
if (gameProfile != null) {
|
|
||||||
gameProfile = ReflectionManager.getGameProfileWithThisSkin(uuid, getProfileName(), getGameProfile());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isDisguiseInUse()) {
|
if (isDisguiseInUse()) {
|
||||||
resendDisguise(DisguiseConfig.isArmorstandsName() ? getName() : "Dinnerbone", true);
|
resendDisguise(DisguiseConfig.isArmorstandsName() ? getName() : "Dinnerbone", true);
|
||||||
} else {
|
} else {
|
||||||
@ -234,10 +229,6 @@ public class PlayerDisguise extends TargetedDisguise {
|
|||||||
|
|
||||||
this.deadmau5Ears = deadmau5Ears;
|
this.deadmau5Ears = deadmau5Ears;
|
||||||
|
|
||||||
if (gameProfile != null) {
|
|
||||||
gameProfile = ReflectionManager.getGameProfileWithThisSkin(uuid, getProfileName(), getGameProfile());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isDisguiseInUse()) {
|
if (isDisguiseInUse()) {
|
||||||
resendDisguise(DisguiseConfig.isArmorstandsName() ? getName() : "deadmau5", true);
|
resendDisguise(DisguiseConfig.isArmorstandsName() ? getName() : "deadmau5", true);
|
||||||
} else {
|
} else {
|
||||||
|
@ -105,7 +105,7 @@ public class DisguiseUtilities {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void handleTeam(Scoreboard board, boolean nameVisible) {
|
public void handleTeam(Scoreboard board, boolean nameVisible) {
|
||||||
nameVisible = !getPlayer().equals("LD_NoName") && !DisguiseConfig.isArmorstandsName() && nameVisible;
|
nameVisible = !DisguiseConfig.isArmorstandsName() && nameVisible;
|
||||||
Team team = board.getTeam(getTeamName());
|
Team team = board.getTeam(getTeamName());
|
||||||
|
|
||||||
if (team == null) {
|
if (team == null) {
|
||||||
@ -1775,9 +1775,9 @@ public class DisguiseUtilities {
|
|||||||
if (mainTeam == null) {
|
if (mainTeam == null) {
|
||||||
mainTeam = scoreboard.registerNewTeam("LD_NoName");
|
mainTeam = scoreboard.registerNewTeam("LD_NoName");
|
||||||
mainTeam.setOption(Option.NAME_TAG_VISIBILITY, OptionStatus.NEVER);
|
mainTeam.setOption(Option.NAME_TAG_VISIBILITY, OptionStatus.NEVER);
|
||||||
mainTeam.addEntry("LD_NoName");
|
mainTeam.addEntry("");
|
||||||
} else if (!mainTeam.hasEntry("LD_NoName")) {
|
} else if (!mainTeam.hasEntry("")) {
|
||||||
mainTeam.addEntry("LD_NoName");
|
mainTeam.addEntry("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -163,11 +163,10 @@ public class PacketHandlerSpawn implements IPacketHandler {
|
|||||||
mods.write(5, pitch);
|
mods.write(5, pitch);
|
||||||
} else if (disguise.getType().isPlayer()) {
|
} else if (disguise.getType().isPlayer()) {
|
||||||
PlayerDisguise playerDisguise = (PlayerDisguise) disguise;
|
PlayerDisguise playerDisguise = (PlayerDisguise) disguise;
|
||||||
boolean visibleOrNewCompat = playerDisguise.isNameVisible() && DisguiseConfig.isScoreboardNames();
|
boolean visibleOrNewCompat = playerDisguise.isNameVisible() || DisguiseConfig.isScoreboardNames();
|
||||||
|
|
||||||
WrappedGameProfile spawnProfile = visibleOrNewCompat ? playerDisguise.getGameProfile() : ReflectionManager
|
WrappedGameProfile spawnProfile = visibleOrNewCompat ? playerDisguise.getGameProfile() : ReflectionManager
|
||||||
.getGameProfileWithThisSkin(UUID.randomUUID(), playerDisguise.isNameVisible() ? playerDisguise.getProfileName() : "LD_NoName",
|
.getGameProfileWithThisSkin(UUID.randomUUID(), playerDisguise.isNameVisible() ? playerDisguise.getName() : "", playerDisguise.getGameProfile());
|
||||||
playerDisguise.getGameProfile());
|
|
||||||
|
|
||||||
int entityId = disguisedEntity.getEntityId();
|
int entityId = disguisedEntity.getEntityId();
|
||||||
PlayerSkinHandler.PlayerSkin skin;
|
PlayerSkinHandler.PlayerSkin skin;
|
||||||
|
Loading…
Reference in New Issue
Block a user