How to check if the player joined the server?

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

  1. Levi

    Levi Skeleton

    Messages:
    824
    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:
    15
    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
    playstatuspacket Is sent when loading screen Is removed , listen for that
     
  4. GamakCZ

    GamakCZ Zombie

    Messages:
    219
    GitHub:
    GamakCZ

Share This Page

  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.