pocketmine\Player::isOnline PHP Method

isOnline() public method

public isOnline ( ) : boolean
return boolean
    public function isOnline() : bool
    {
        return $this->connected === true and $this->loggedIn === true;
    }

Usage Example

Example #1
0
 /**
  * @param int $currentTick
  */
 public function onRun($currentTick)
 {
     if ($this->requester instanceof Player && $this->requester->isOnline()) {
         $this->getAPI()->getServer()->getLogger()->debug(TextFormat::YELLOW . "Running EssentialsPE's TPRequestTask");
         $this->getAPI()->removeTPRequest($this->requester);
     }
 }
All Usage Examples Of pocketmine\Player::isOnline
Player