mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-06 08:17:44 +01:00
Fix Player#setScoreboard() checking incorrect state
By: Parker Hawke <hawkeboyz2@hotmail.com>
This commit is contained in:
parent
5480af2bba
commit
46dda8a1e6
@ -1820,7 +1820,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
public void setScoreboard(Scoreboard scoreboard) {
|
||||
Preconditions.checkArgument(scoreboard != null, "Scoreboard cannot be null");
|
||||
Preconditions.checkState(getHandle().connection != null, "Cannot set scoreboard yet (invalid player connection)");
|
||||
Preconditions.checkState(getHandle().connection.isDisconnected(), "Cannot set scoreboard for invalid CraftPlayer (player is disconnected)");
|
||||
Preconditions.checkState(!getHandle().connection.isDisconnected(), "Cannot set scoreboard for invalid CraftPlayer (player is disconnected)");
|
||||
|
||||
this.server.getScoreboardManager().setPlayerBoard(this, scoreboard);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user