diff --git a/src/pocketmine/block/Door.php b/src/pocketmine/block/Door.php index 5a0e2cd1c..2357e26a3 100644 --- a/src/pocketmine/block/Door.php +++ b/src/pocketmine/block/Door.php @@ -272,12 +272,7 @@ abstract class Door extends Transparent{ $down = $this->getSide(0); if($down->getId() === $this->getId()){ $meta = $down->getDamage() ^ 0x04; - $this->getLevel()->setBlock($down, Block::get($this->getId(), $meta), true); - $players = $this->getLevel()->getChunkPlayers($this->x >> 4, $this->z >> 4); - if($player instanceof Player){ - unset($players[$player->getLoaderId()]); - } - + $this->level->setBlock($down, Block::get($this->getId(), $meta), true); $this->level->addSound(new DoorSound($this)); return true; } @@ -285,11 +280,7 @@ abstract class Door extends Transparent{ return false; }else{ $this->meta ^= 0x04; - $this->getLevel()->setBlock($this, $this, true); - $players = $this->getLevel()->getChunkPlayers($this->x >> 4, $this->z >> 4); - if($player instanceof Player){ - unset($players[$player->getLoaderId()]); - } + $this->level->setBlock($this, $this, true); $this->level->addSound(new DoorSound($this)); }