Do not call PlayerLoginEvent during the Player constructor

this closes a lot of loopholes in the login sequence that plugins were using to cause crashes.
This commit is contained in:
Dylan K. Taylor
2021-10-04 22:36:50 +01:00
parent 356a49d225
commit bb6ea8cbdc
3 changed files with 29 additions and 24 deletions

View File

@@ -234,6 +234,10 @@ class NetworkSession{
return;
}
$this->player = $player;
if(!$this->server->addOnlinePlayer($player)){
return;
}
$this->invManager = new InventoryManager($this->player, $this);
$effectManager = $this->player->getEffects();