Possible fix for entities not closing correctly

This commit is contained in:
Shoghi Cervantes 2014-10-21 19:26:16 +02:00
parent 8f7dfe0b71
commit 580ade9092

View File

@ -1175,7 +1175,7 @@ abstract class Entity extends Location implements Metadatable{
}
public function close(){
if($this->closed === false){
if(!$this->closed){
$this->server->getPluginManager()->callEvent(new EntityDespawnEvent($this));
$this->closed = true;
unset($this->level->updateEntities[$this->id]);