Fix Player#setScoreboard() checking incorrect state
By: Parker Hawke <hawkeboyz2@hotmail.com>
This commit is contained in:
parent
5480af2bba
commit
46dda8a1e6
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue