From ac593849aec264019a7e327086ce303031668ecd Mon Sep 17 00:00:00 2001 From: Wesley Wolfe Date: Thu, 11 Apr 2013 23:03:37 -0500 Subject: [PATCH] Use correct method for getting player's team. Fixes BUKKIT-4050 The method getTeam gets the team from name of, as opposed to getting the team a player belongs to. This also addresses BUKKIT-4002 and partially BUKKIT-4044 --- .../java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java index 63b8085325..72b02b07ce 100644 --- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java +++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java @@ -93,7 +93,7 @@ public final class CraftScoreboard implements org.bukkit.scoreboard.Scoreboard { public Team getPlayerTeam(OfflinePlayer player) throws IllegalArgumentException { Validate.notNull(player, "OfflinePlayer cannot be null"); - ScoreboardTeam team = board.getTeam(player.getName()); + ScoreboardTeam team = board.getPlayerTeam(player.getName()); return team == null ? null : teams.get(team.getName()); }