pocketmine\Player::isSpectator PHP 메소드

isSpectator() 공개 메소드

public isSpectator ( ) : boolean
리턴 boolean
    public function isSpectator() : bool
    {
        return $this->gamemode === 3;
    }

Usage Example

예제 #1
0
 /**
  * Clear players inventory
  * @param Player $target
  */
 public static function clearInventory(Player $target)
 {
     if ($target->isCreative() || $target->isSpectator()) {
         return;
     }
     $target->getInventory()->clearAll();
 }
All Usage Examples Of pocketmine\Player::isSpectator
Player