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

Solved getOnlinePlayers() Array NOT instance of player

Comments in 'Plugin Development' started by MinePocket Servers, Apr 24, 2016.

  1. MinePocket Servers
    Offline

    MinePocket Servers Active Member

    Joined:
    Mar 6, 2014
    Posts:
    69
    Minecraft User:
    MinePocket
    $playerlist = $this->getServer()->getOnlinePlayers();

    $playerlist is NOT an array of player objects (not instanceof Player)

    How do I get $playerlist as an array of player objects OR how do I get an array of online player usernames
  2. Intyre
    Offline

    Intyre Staff Member PocketMine Team

    Joined:
    Aug 24, 2013
    Posts:
    118
    Minecraft User:
    Intyre
  3. MinePocket Servers
    Offline

    MinePocket Servers Active Member

    Joined:
    Mar 6, 2014
    Posts:
    69
    Minecraft User:
    MinePocket

Share This Page

Advertisement