Fixed some inventory events not firing on players

This commit is contained in:
Shoghi Cervantes
2014-11-02 13:26:58 +01:00
parent da4334f06b
commit 75c0d8324c
4 changed files with 38 additions and 25 deletions

View File

@ -738,7 +738,9 @@ abstract class Entity extends Location implements Metadatable{
}
$this->level->removeEntity($this);
$this->chunk->removeEntity($this);
if($this->chunk !== null){
$this->chunk->removeEntity($this);
}
$this->despawnFromAll();
if($this instanceof Player){
foreach($this->usedChunks as $index => $d){