Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 12:30:06 +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
Dieser Commit ist enthalten in:
Ursprung
77d1524b3d
Commit
ac593849ae
@ -93,7 +93,7 @@ public final class CraftScoreboard implements org.bukkit.scoreboard.Scoreboard {
|
|||||||
public Team getPlayerTeam(OfflinePlayer player) throws IllegalArgumentException {
|
public Team getPlayerTeam(OfflinePlayer player) throws IllegalArgumentException {
|
||||||
Validate.notNull(player, "OfflinePlayer cannot be null");
|
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());
|
return team == null ? null : teams.get(team.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren