mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-16 19:59:11 +00:00
Fixed #1960
This commit is contained in:
@@ -2107,7 +2107,6 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
|
||||
$this->tasks = [];
|
||||
|
||||
if($this->connected === true){
|
||||
parent::close();
|
||||
if($this->username != ""){
|
||||
$this->server->getPluginManager()->callEvent($ev = new PlayerQuitEvent($this, $message));
|
||||
if($this->loggedIn === true){
|
||||
@@ -2132,6 +2131,8 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
|
||||
$this->usedChunks = [];
|
||||
$this->loadQueue = [];
|
||||
unset($this->buffer);
|
||||
|
||||
parent::close();
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -870,7 +870,7 @@ abstract class Entity extends Position implements Metadatable{
|
||||
*
|
||||
* @return Block[]
|
||||
*/
|
||||
protected function checkBlockCollision(&$list = array()){
|
||||
protected function checkBlockCollision(&$list = []){
|
||||
$minX = floor($this->boundingBox->minX + 0.001);
|
||||
$minY = floor($this->boundingBox->minY + 0.001);
|
||||
$minZ = floor($this->boundingBox->minZ + 0.001);
|
||||
@@ -1055,7 +1055,7 @@ abstract class Entity extends Position implements Metadatable{
|
||||
$level->removeEntity($this);
|
||||
}
|
||||
$this->despawnFromAll();
|
||||
unset($this->level);
|
||||
$this->level = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -117,7 +117,7 @@ abstract class Tile extends Position{
|
||||
if(($level = $this->getLevel()) instanceof Level){
|
||||
$level->removeTile($this);
|
||||
}
|
||||
unset($this->level);
|
||||
$this->level = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user