1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Get players

Discussion in 'Facepalm' started by SergeyIvanov, Aug 4, 2017.

  1. SergeyIvanov

    SergeyIvanov Witch

    Messages:
    59
    GitHub:
    sergeyivanov14
    How to get all players name from the folder with name players? players/playername.yml
     
  2. Enes5519

    Enes5519 Spider Jockey

    Messages:
    28
    GitHub:
    Enes5519
    PHP:
    $cfg = new Config(); // u can set
    $players = ["Enes5519""Unknown"];
    $cfg->set("Players"$players);
    $cfg->save();

    foreach(
    $cfg->get("Players") as $player){
        
    $player $this->getServer()->getPlayerExact($player);
        
    // finish :d
    }
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.