Player: fixed immobile interference on PlayerJoinEvent

closes #2894

this should use a cleaner hack that doesn't affect plugins at all, but that's too much work for this one bug fix.
This commit is contained in:
Dylan K. Taylor 2019-05-02 16:20:28 +01:00
parent de09c8c082
commit f6a0f4aa82

View File

@ -1065,6 +1065,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
return; //avoid player spawning twice (this can only happen on 3.x with a custom malicious client)
}
$this->spawned = true;
$this->setImmobile(false);
if($this->hasPermission(Server::BROADCAST_CHANNEL_USERS)){
PermissionManager::getInstance()->subscribeToPermission(Server::BROADCAST_CHANNEL_USERS, $this);
@ -1083,7 +1084,6 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
$this->server->broadcastMessage($ev->getJoinMessage());
}
$this->setImmobile(false);
$this->noDamageTicks = 60;
foreach($this->usedChunks as $index => $c){