Handle UUIDs for teams as well as names #418
This commit is contained in:
parent
f8fe3116df
commit
54bd979506
@ -188,9 +188,13 @@ 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());
|
||||||
|
|
||||||
|
if (team == null) {
|
||||||
|
team = ((Player) player).getScoreboard().getEntryTeam(((Player) player).getUniqueId().toString());
|
||||||
|
|
||||||
if (team == null) {
|
if (team == null) {
|
||||||
return player.getName();
|
return player.getName();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return team.getPrefix() + team.getColor() + player.getName() + team.getSuffix();
|
return team.getPrefix() + team.getColor() + player.getName() + team.getSuffix();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user