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

doFirstSpawn ()

Comments in 'Plugin Development' started by LoveToBeDev, Sep 10, 2015.

  1. jojoe77777
    Offline

    jojoe77777 Notable Member Plugin Developer

    Joined:
    May 28, 2015
    Posts:
    653
    Plugins:
    1
    Minecraft User:
    jojoe77777
    I think you mean
    PHP:
    public function onJoin(PlayerJoinEvent $event){
    $player $event->getName();
    if(
    file_exists("players/".strtolower($player->getName()).".dat") == false){
    $event->setJoinMessage($player->getName()." Joined for the first time :)");
    }
    }
    ? (Added / into file_exists)
  2. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    Yup, edited.
  3. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    That doesn't work. The file is already created at PlayerJoinEvent.

    I have created an issue on PocketMine repo.

    https://github.com/PocketMine/PocketMine-MP/issues/3463
  4. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV

Share This Page

Advertisement