mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 19:15:32 +01:00
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:
parent
77d1524b3d
commit
ac593849ae
@ -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());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user