From 54bd979506676cfa68a566d4114fb59448052f6f Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Mon, 6 Jan 2020 07:30:22 +1300 Subject: [PATCH] Handle UUIDs for teams as well as names #418 --- .../disguise/commands/DisguiseBaseCommand.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/me/libraryaddict/disguise/commands/DisguiseBaseCommand.java b/src/main/java/me/libraryaddict/disguise/commands/DisguiseBaseCommand.java index b24a935f..40cc1fa6 100644 --- a/src/main/java/me/libraryaddict/disguise/commands/DisguiseBaseCommand.java +++ b/src/main/java/me/libraryaddict/disguise/commands/DisguiseBaseCommand.java @@ -189,7 +189,11 @@ public abstract class DisguiseBaseCommand implements CommandExecutor { Team team = ((Player) player).getScoreboard().getEntryTeam(player.getName()); 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();