diff --git a/src/pocketmine/block/Door.php b/src/pocketmine/block/Door.php index 10ac4c83c..70f0bdcf8 100644 --- a/src/pocketmine/block/Door.php +++ b/src/pocketmine/block/Door.php @@ -104,7 +104,7 @@ abstract class Door extends Transparent{ $this->getLevel()->setBlock($down, Block::get($this->id, $meta), true, false, true); $players = $this->getLevel()->getUsingChunk($this->x >> 4, $this->z >> 4); if($player instanceof Player){ - unset($players[$player->CID]); + unset($players[$player->getID()]); } $pk = new LevelEventPacket; $pk->x = $this->x; @@ -123,7 +123,7 @@ abstract class Door extends Transparent{ $this->getLevel()->setBlock($this, $this, true, false, true); $players = $this->getLevel()->getUsingChunk($this->x >> 4, $this->z >> 4); if($player instanceof Player){ - unset($players[$player->CID]); + unset($players[$player->getID()]); } $pk = new LevelEventPacket; $pk->x = $this->x; diff --git a/src/pocketmine/entity/Entity.php b/src/pocketmine/entity/Entity.php index b130ece02..c863cdec2 100644 --- a/src/pocketmine/entity/Entity.php +++ b/src/pocketmine/entity/Entity.php @@ -857,10 +857,10 @@ abstract class Entity extends Position implements Metadatable{ if(!$this->justCreated){ $newChunk = $this->getLevel()->getUsingChunk($this->x >> 4, $this->z >> 4); foreach($this->hasSpawned as $player){ - if(!isset($newChunk[$player->CID])){ + if(!isset($newChunk[$player->getID()])){ $this->despawnFrom($player); }else{ - unset($newChunk[$player->CID]); + unset($newChunk[$player->getID()]); } } foreach($newChunk as $player){