mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-17 04:06:54 +00:00
Revert "Workaround for some plugins crashing clients during PlayerLoginEvent"
This reverts commit 087a994393
.
This commit is contained in:
@@ -1868,6 +1868,12 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
|||||||
|
|
||||||
protected function completeLoginSequence(){
|
protected function completeLoginSequence(){
|
||||||
parent::__construct($this->level, $this->namedtag);
|
parent::__construct($this->level, $this->namedtag);
|
||||||
|
$this->server->getPluginManager()->callEvent($ev = new PlayerLoginEvent($this, "Plugin reason"));
|
||||||
|
if($ev->isCancelled()){
|
||||||
|
$this->close($this->getLeaveMessage(), $ev->getKickMessage());
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(!$this->hasValidSpawnPosition()){
|
if(!$this->hasValidSpawnPosition()){
|
||||||
if(isset($this->namedtag->SpawnLevel) and ($level = $this->server->getLevelByName((string) $this->namedtag["SpawnLevel"])) instanceof Level){
|
if(isset($this->namedtag->SpawnLevel) and ($level = $this->server->getLevelByName((string) $this->namedtag["SpawnLevel"])) instanceof Level){
|
||||||
@@ -1905,13 +1911,6 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
|||||||
$pk->worldName = $this->server->getMotd();
|
$pk->worldName = $this->server->getMotd();
|
||||||
$this->dataPacket($pk);
|
$this->dataPacket($pk);
|
||||||
|
|
||||||
$this->server->getPluginManager()->callEvent($ev = new PlayerLoginEvent($this, "Plugin reason"));
|
|
||||||
if($ev->isCancelled()){
|
|
||||||
$this->close($this->getLeaveMessage(), $ev->getKickMessage());
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->level->sendTime($this);
|
$this->level->sendTime($this);
|
||||||
|
|
||||||
$this->sendAttributes(true);
|
$this->sendAttributes(true);
|
||||||
|
Reference in New Issue
Block a user