m = $plugin; $this->worlds = $worlds; } public function onRun($tick) { foreach($this->worlds as $world) { $wpls = []; foreach($this->m->getServer()->getOnlinePlayers() as $pl){ if($world->getName() === $pl->getLevel()->getName() and ($pl->isSurvival())) { array_push($wpls, $pl); } } $world->setPlayers($wpls); if(count($wpls) > $world->getMaxPlayers()*0.75 and count($wpls) < $world->getMaxPlayers()) { $this->m->UHCManager->startGame($world); } } $this->worlds = $this->m->UHCManager->getLevels(); } }