Hello pmmp, I'm making a minigame plugin and I have this: PHP: public function onRun($tick){ $config = new Config($this->plugin->getDataFolder() . "/config.yml", Config::YAML); $slots = new Config($this->plugin->getDataFolder() . "/slots.yml", Config::YAML); $arenas = $config->get("arenas"); if(!empty($arenas)){ foreach($arenas as $arena){ $time = $config->get($arena . "PlayTime"); $timeToStart = $config->get($arena . "StartTime"); $levelArena = $this->plugin->getServer()->getLevelByName($arena); $level = $this->plugin->getServer()->getLevelByName($arena); $this->levela = $levelArena; if($levelArena instanceof Level) { $playersArena = $levelArena->getPlayers(); if(count($playersArena)==0) { $config->set($arena . "PlayTime", 780); $config->set($arena . "StartTime", 21); } else { if(count($playersArena)>=1) { if($timeToStart>0) { $timeToStart--; foreach($playersArena as $pl){ $levelArena->addSound(new PopSound($pl)); $pl->sendPopup(TextFormat::YELLOW . "Starting in " . TextFormat::AQUA . $timeToStart . ""); if($timeToStart === 5){ $pl->addTitle("§c§l5", "", 0, 20, 0); if($timeToStart === 4){ $pl->addTitle("§6§l4", "", 0, 20, 0); if($timeToStart === 3){ $pl->addTitle("§6§l3", "", 0, 20, 0); if($timeToStart === 2){ $pl->addTitle("§e§l2", "", 0, 20, 0); if($timeToStart === 1){ $pl->addTitle("§a§l", "", 0, 20, 0); if($timeToStart<=0){ $levelArena->addSound(new GhastShootSound($pl)); $pl->sendMessage("§b§l»§r§e The match has §a§lSTARTED!"); $pl->sendPopup(TextFormat::YELLOW . "Good luck!"); $pl->addTitle("", "", 0, 30, 0); $this->refillChests($levelArena); $config->set($arena . "StartTime", $timeToStart); } } } } } } if($timeToStart === 5){ foreach($playersArena as $pla) { if($slots->get("slot1".$arena)==$pla->getName()) { $thespawn = $config->get($arena . "Spawn1"); } elseif($slots->get("slot2".$arena)==$pla->getName()) { $thespawn = $config->get($arena . "Spawn2"); } $spawn = new Position($thespawn[0]+0.5,$thespawn[1],$thespawn[2]+0.5,$levelArena); $pla->teleport($spawn,0,0); } } } } else { So I'm able to join the game and yes $slots is all sorted further up the code when a player joins the match. I am trying to send each player to their $slots position when the countdown reaches 5. at the moment it just repeats a popping sound and continuously gives the popup: 'starting in 20' I am fairly sure the code is correct but I think it's in the wrong format/order.. Could someone help, thanks