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

How to check if the player joined the server?

Discussion in 'Development' started by Levi, May 6, 2019.

  1. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    How to check if the player joined the server? Like if the player is out of the loading screen and is on the server.
     
  2. JackMD

    JackMD Silverfish

    Messages:
    22
    GitHub:
    jackmd
    PHP:
    $player $this->getServer()->getPlayerExact('player name');

    if(!
    is_null($player) && $player instanceof Player && $player->isOnline()){
        
    //player is online
    }else{
        
    //player is offline
    }
     
  3. Kyd

    Kyd Zombie Pigman

    Messages:
    678
    GitHub:
    boi1216
    playstatuspacket Is sent when loading screen Is removed , listen for that
     
  4. GamakCZ

    GamakCZ Zombie Pigman

    Messages:
    598
    GitHub:
    GamakCZ
    radondev likes this.
  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.