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
This commit is contained in:
Wesley Wolfe 2013-04-11 23:03:37 -05:00
parent 77d1524b3d
commit ac593849ae

View File

@ -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());
}