isOpeningObstructed()){ $this->openToUnchecked($player); } return true; } abstract protected function newMenu(Player $player, Position $position) : InventoryWindow; public function isOpeningObstructed() : bool{ return false; } abstract protected function getPosition() : Position; public function openToUnchecked(Player $player) : bool{ return $player->setCurrentWindow($this->newMenu($player, $this->getPosition())); } }