From 1ec94b52c198c5c31b4586edba6b1370ee59a111 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot 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 By: Wesley Wolfe --- .../java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java b/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java index 63b808532..72b02b07c 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java +++ b/paper-server/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()); }