Player: confine command data resending on permission recalculate to post-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.
This commit is contained in:
Dylan K. Taylor 2018-05-17 19:26:42 -04:00
parent 2034caf71c
commit 8c1c8f34cc

View File

@ -653,7 +653,9 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
$this->server->getPluginManager()->subscribeToPermission(Server::BROADCAST_CHANNEL_ADMINISTRATIVE, $this);
}
$this->sendCommandData();
if($this->spawned){
$this->sendCommandData();
}
}
/**