public function onActivate(Item $item, Player $player = null) { $this->getLevel()->setBlock($this, new DaylightDetector(), true, true); $this->getTile()->onUpdate(); return true; }