Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

get Online Players in multi world

Comments in 'Plugin Development' started by a9eelsh, Nov 13, 2014.

  1. a9eelsh
    Offline

    a9eelsh New Member

    Joined:
    Nov 6, 2014
    Posts:
    16
    Minecraft User:
    a9eelsh
    Get the number of players in a multi- worlds [new api]
  2. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    count($server->getOnlinePlayers())
    EvolSoft likes this.
  3. a9eelsh
    Offline

    a9eelsh New Member

    Joined:
    Nov 6, 2014
    Posts:
    16
    Minecraft User:
    a9eelsh
    I want to get on it because of the mini game I want to get the callers for each single world
    I do not want everyone I want every single world
  4. 64FF00
    Offline

    64FF00 Active Member Plugin Developer

    Joined:
    May 11, 2014
    Posts:
    297
    Plugins:
    2
    Minecraft User:
    64FF00
    (pocketmine\level\Level) $level ->getPlayers()
    Falk likes this.
  5. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    count($level->getPlayers())
    64FF00 likes this.
  6. 64FF00
    Offline

    64FF00 Active Member Plugin Developer

    Joined:
    May 11, 2014
    Posts:
    297
    Plugins:
    2
    Minecraft User:
    64FF00
    Forgot to add count() xD
    PEMapModder likes this.
  7. a9eelsh
    Offline

    a9eelsh New Member

    Joined:
    Nov 6, 2014
    Posts:
    16
    Minecraft User:
    a9eelsh
    thank you :)
    PEMapModder and 64FF00 like this.
  8. Xenturio
    Offline

    Xenturio Active Member

    Joined:
    Sep 19, 2014
    Posts:
    333
    Minecraft User:
    Xenturio
  9. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    • It counts non-player entities too
    • Why can't you just count the number of players in the level? That is the fastest.
    64FF00 likes this.

Share This Page

Advertisement