Hello pmmp! I'm wanting to get the world a player is in and then get the number of players in that world. I have this, but it seems to be the incorrect method :/ could someone help me PHP: $gamecounter = $player->getLevel->getLevelByName()->getPlayers(); $playersArena = count($gamecounter);
PHP: $world = Player->getLevel()->getFolderName(); //string$worldPlayerCount = count(Player->getLevel()->getPlayers()); //int
getName() returns the name in level.dat, and getFolderName() returns the folder name. Usually we use getFolderName() for identifying the level, e.g. in Server->getLevelByName().