pocketmine\Player::isConnected PHP Method

isConnected() public method

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

Usage Example

Exemplo n.º 1
0
 /**
  * @param Player $player
  * @return null|string
  */
 public function getValidUUID(Player $player)
 {
     $uuid = $player->getUniqueId();
     if ($uuid instanceof UUID) {
         return $uuid->toString();
     }
     // Heheheh...
     $this->getLogger()->warning("Why did you give me an invalid unique id? *cries* (userName: "******", isConnected: " . $player->isConnected() . ", isOnline: " . $player->isOnline() . ", isValid: " . $player->isValid() . ")");
     return null;
 }
Player