Call setName() instead of setting name directly

This commit is contained in:
libraryaddict 2020-04-24 19:34:37 +12:00
parent a63e617b0a
commit 740fac23ba
No known key found for this signature in database
GPG Key ID: 052E4FBCD257AEA4

@ -80,6 +80,7 @@ public class PlayerDisguise extends TargetedDisguise {
createDisguise(); createDisguise();
} }
@Deprecated
public DisguiseUtilities.DScoreTeam getScoreboardName() { public DisguiseUtilities.DScoreTeam getScoreboardName() {
if (getName().length() <= 32 ? !DisguiseConfig.isScoreboardDisguiseNames() : if (getName().length() <= 32 ? !DisguiseConfig.isScoreboardDisguiseNames() :
!DisguiseConfig.isExtendedDisguiseNames()) { !DisguiseConfig.isExtendedDisguiseNames()) {
@ -162,8 +163,6 @@ public class PlayerDisguise extends TargetedDisguise {
public PlayerDisguise clone() { public PlayerDisguise clone() {
PlayerDisguise disguise = new PlayerDisguise(); PlayerDisguise disguise = new PlayerDisguise();
disguise.playerName = getName();
if (currentLookup == null && gameProfile != null) { if (currentLookup == null && gameProfile != null) {
disguise.skinToUse = getSkin(); disguise.skinToUse = getSkin();
disguise.gameProfile = ReflectionManager disguise.gameProfile = ReflectionManager
@ -172,6 +171,7 @@ public class PlayerDisguise extends TargetedDisguise {
disguise.setSkin(getSkin()); disguise.setSkin(getSkin());
} }
disguise.setName(getName());
disguise.setNameVisible(isNameVisible()); disguise.setNameVisible(isNameVisible());
disguise.setDynamicName(isDynamicName()); disguise.setDynamicName(isDynamicName());