Hi, is there're anyway to get number of online players? I'm using this code: PHP: count($this->getServer()->getOnlinePlayers()) Is this code correct and able to get number of online players? Because there's people saying count() is only for array thingy.... So, I have doubt on it...
@PEMapModder said it, check out the topic, Mechanics in Plugin Development Sorry if I am wrong I am still learning
Don't try to be a smart-a**. $this->getServer()->getOnlinePlayers() exist, but not $level->getOnlinePlayers(). #ReadTheDocs.
If you don't understand, please do not post. Every post you make will be kept on the forums and last forever, and people who read it in the future will be misled.
in case anyone else was wondering, the correct way to get the players in a level is $level->getPlayers();