Handle UUIDs for teams as well as names #418

This commit is contained in:
libraryaddict 2020-01-06 07:30:22 +13:00
parent f8fe3116df
commit 54bd979506
No known key found for this signature in database
GPG Key ID: 052E4FBCD257AEA4

View File

@ -189,7 +189,11 @@ public abstract class DisguiseBaseCommand implements CommandExecutor {
Team team = ((Player) player).getScoreboard().getEntryTeam(player.getName()); Team team = ((Player) player).getScoreboard().getEntryTeam(player.getName());
if (team == null) { if (team == null) {
return player.getName(); team = ((Player) player).getScoreboard().getEntryTeam(((Player) player).getUniqueId().toString());
if (team == null) {
return player.getName();
}
} }
return team.getPrefix() + team.getColor() + player.getName() + team.getSuffix(); return team.getPrefix() + team.getColor() + player.getName() + team.getSuffix();