pocketmine\event\player\PlayerDeathEvent::getEntity PHP Метод

getEntity() публичный Метод

public getEntity ( ) : Player
Результат pocketmine\Player
    public function getEntity()
    {
        return $this->entity;
    }

Usage Example

Пример #1
2
 /**
  * @priority LOW
  */
 public function onPlayerDeath(PlayerDeathEvent $e)
 {
     list($timer, $msg) = $this->getState($e->getEntity(), [0, ""]);
     if (time() - $timer > 1) {
         return;
     }
     $e->setDeathMessage($msg);
     $this->unsetState($e->getEntity());
 }
All Usage Examples Of pocketmine\event\player\PlayerDeathEvent::getEntity