Skip to content

Commit

Permalink
Player: confine command data resending on permission recalculate to p…
Browse files Browse the repository at this point in the history
…ost-spawn only

this fixes crashes when PurePerms causes this to be recalculated on player login - the client doesn't like receiving this before StartGame and crashes.

Confining this to post-spawn should not cause any issues since any permission recalculation in login events will be reflected immediately afterwards when the initial command data is sent anyway.

This same bug popped up at 1.1... I don't know why it wasn't fixed properly back then.
  • Loading branch information
dktapps committed May 17, 2018
1 parent 2034caf commit 8c1c8f3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pocketmine/Player.php
Expand Up @@ -653,7 +653,9 @@ public function recalculatePermissions(){
$this->server->getPluginManager()->subscribeToPermission(Server::BROADCAST_CHANNEL_ADMINISTRATIVE, $this);
}

$this->sendCommandData();
if($this->spawned){
$this->sendCommandData();
}
}

/**
Expand Down

0 comments on commit 8c1c8f3

Please sign in to comment.