Fix LibsDisguises

This commit is contained in:
libraryaddict 2020-09-04 11:11:17 +12:00
parent 33e803134b
commit 090ce6e8c5
2 changed files with 7 additions and 6 deletions

View File

@ -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);
}
}

View File

@ -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() {