mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-01 20:50:41 +01:00
Fix mismatch between teams and player teams.
This commit is contained in:
parent
42ebec1f71
commit
00eba538b0
1 changed files with 3 additions and 2 deletions
|
@ -105,13 +105,14 @@ 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");
|
||||||
|
|
||||||
return getTeam(player.getName());
|
ScoreboardTeam team = board.getPlayerTeam(player.getName());
|
||||||
|
return team == null ? null : new CraftTeam(this, team);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Team getTeam(String teamName) throws IllegalArgumentException {
|
public Team getTeam(String teamName) throws IllegalArgumentException {
|
||||||
Validate.notNull(teamName, "Team name cannot be null");
|
Validate.notNull(teamName, "Team name cannot be null");
|
||||||
|
|
||||||
ScoreboardTeam team = board.getPlayerTeam(teamName);
|
ScoreboardTeam team = board.getTeam(teamName);
|
||||||
return team == null ? null : new CraftTeam(this, team);
|
return team == null ? null : new CraftTeam(this, team);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue