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

Create .yml file with players name

Discussion in 'Facepalm' started by kaliiks, Jan 14, 2017.

  1. kaliiks

    kaliiks Zombie

    Messages:
    250
    How can i create .yml file in folder players ???
     
  2. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
    add this to the onEnable function
    PHP:
    @mkdir($this->getDataFolder()."Players");
    this may need modified, but this will create a yaml file with the player's name
    PHP:
    new Config($this->getDataFolder() . "Players" DIRECTORY_SEPARATOR $player ".yml"Config::YAML, []);
     
  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.