Fix Dinnerbone and Grumm being spun the wrong way around
This commit is contained in:
@@ -98,7 +98,15 @@ public class PlayerDisguise extends TargetedDisguise {
|
||||
return scoreboardName;
|
||||
}
|
||||
|
||||
private boolean isStaticName(String name) {
|
||||
return name != null && (name.equalsIgnoreCase("Dinnerbone") || name.equalsIgnoreCase("Grumm"));
|
||||
}
|
||||
|
||||
public boolean hasScoreboardName() {
|
||||
if (isStaticName(getName())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return scoreboardName != null || DisguiseConfig.isScoreboardDisguiseNames() || getName().length() > 16;
|
||||
}
|
||||
|
||||
@@ -214,9 +222,9 @@ public class PlayerDisguise extends TargetedDisguise {
|
||||
}
|
||||
|
||||
if (isDisguiseInUse()) {
|
||||
boolean resendDisguise = !DisguiseConfig.isScoreboardDisguiseNames();
|
||||
boolean resendDisguise = false;
|
||||
|
||||
if (hasScoreboardName()) {
|
||||
if (DisguiseConfig.isScoreboardDisguiseNames() && !isStaticName(name)) {
|
||||
DisguiseUtilities.DScoreTeam team = getScoreboardName();
|
||||
String[] split = DisguiseUtilities.getExtendedNameSplit(team.getPlayer(), name);
|
||||
|
||||
@@ -224,6 +232,10 @@ public class PlayerDisguise extends TargetedDisguise {
|
||||
team.setSplit(split);
|
||||
}
|
||||
|
||||
resendDisguise =
|
||||
!DisguiseConfig.isScoreboardDisguiseNames() || isStaticName(name) || isStaticName(getName()) ||
|
||||
resendDisguise;
|
||||
|
||||
if (resendDisguise) {
|
||||
if (stopDisguise()) {
|
||||
if (getName().isEmpty() && !name.isEmpty()) {
|
||||
|
@@ -1300,6 +1300,10 @@ public class DisguiseUtilities {
|
||||
public static void updateExtendedName(PlayerDisguise disguise) {
|
||||
DScoreTeam exName = disguise.getScoreboardName();
|
||||
|
||||
if (exName.getTeamName() == null) {
|
||||
exName.setTeamName(getUniqueTeam());
|
||||
}
|
||||
|
||||
for (Scoreboard board : getAllScoreboards()) {
|
||||
exName.handleTeam(board, disguise.isNameVisible());
|
||||
}
|
||||
@@ -1326,6 +1330,10 @@ public class DisguiseUtilities {
|
||||
|
||||
DScoreTeam name = ((PlayerDisguise) disguise).getScoreboardName();
|
||||
|
||||
if (name.getTeamName() == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
name.handleTeam(scoreboard, ((PlayerDisguise) disguise).isNameVisible());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user