diff --git a/src/main/java/me/libraryaddict/disguise/disguisetypes/PlayerDisguise.java b/src/main/java/me/libraryaddict/disguise/disguisetypes/PlayerDisguise.java index e234db0d..bc51d13f 100644 --- a/src/main/java/me/libraryaddict/disguise/disguisetypes/PlayerDisguise.java +++ b/src/main/java/me/libraryaddict/disguise/disguisetypes/PlayerDisguise.java @@ -111,9 +111,9 @@ public class PlayerDisguise extends TargetedDisguise { if (scoreboardName == null) { if (isUpsideDown()) { - scoreboardName = new DisguiseUtilities.DScoreTeam(new String[]{"", getProfileName(), ""}); + scoreboardName = new DisguiseUtilities.DScoreTeam(this, new String[]{"", getProfileName(), ""}); } else { - scoreboardName = DisguiseUtilities.createExtendedName(getName()); + scoreboardName = DisguiseUtilities.createExtendedName(this); } } diff --git a/src/main/java/me/libraryaddict/disguise/utilities/DisguiseUtilities.java b/src/main/java/me/libraryaddict/disguise/utilities/DisguiseUtilities.java index c8cdfe17..fc4ef9b5 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/DisguiseUtilities.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/DisguiseUtilities.java @@ -76,7 +76,8 @@ import java.util.stream.Collectors; public class DisguiseUtilities { @Setter public static class DScoreTeam { - public DScoreTeam(String[] name) { + public DScoreTeam(PlayerDisguise disguise, String[] name) { + this.disguise = disguise; this.split = name; } @@ -1547,10 +1548,10 @@ public class DisguiseUtilities { return boards; } - public static DScoreTeam createExtendedName(String name) { - String[] split = getExtendedNameSplit(null, name); + public static DScoreTeam createExtendedName(PlayerDisguise disguise) { + String[] split = getExtendedNameSplit(null, disguise.getName()); - return new DScoreTeam(split); + return new DScoreTeam(disguise, split); } public static String getUniqueTeam() {