Cleaned up scoreboard team color/prefix/suffix code and correctly ordered the layout

This commit is contained in:
libraryaddict 2019-01-29 23:19:13 +13:00
parent ddaac88f39
commit 3edd1248ef

View File

@ -53,8 +53,11 @@ public abstract class DisguiseBaseCommand implements CommandExecutor {
protected String getDisplayName(CommandSender player) { protected String getDisplayName(CommandSender player) {
Team team = ((Player) player).getScoreboard().getEntryTeam(player.getName()); Team team = ((Player) player).getScoreboard().getEntryTeam(player.getName());
return (team == null ? "" : team.getColor() + team.getPrefix()) + player.getName() + if (team == null) {
(team == null ? "" : team.getSuffix()); return player.getName();
}
return team.getPrefix() + team.getColor() + player.getName() + team.getSuffix();
} }
protected ArrayList<String> getAllowedDisguises(DisguisePermissions permissions) { protected ArrayList<String> getAllowedDisguises(DisguisePermissions permissions) {