This commit is contained in:
Shoghi Cervantes 2014-08-24 15:55:52 +02:00
parent 214dcef1ea
commit f0f9bccb4b
3 changed files with 5 additions and 4 deletions

View File

@ -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();
}
}

View File

@ -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;
}
}

View File

@ -117,7 +117,7 @@ abstract class Tile extends Position{
if(($level = $this->getLevel()) instanceof Level){
$level->removeTile($this);
}
unset($this->level);
$this->level = null;
}
}