pocketmine\Player::getName PHP Method

getName() public method

Gets the username
public getName ( ) : string
return string
    public function getName()
    {
        return $this->username;
    }

Usage Example

Example #1
31
 public function removeSpectator(Player $player)
 {
     if (isset($this->spectators[strtolower($player->getName())])) {
         unset($this->spectators[strtolower($player->getName())]);
     }
     $this->update();
 }
All Usage Examples Of pocketmine\Player::getName
Player