mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 19:02:59 +00:00
Added typehints and PhpDoc for events API
excluded blocks and entities events API to avoid merge conflicts
This commit is contained in:
@ -25,9 +25,10 @@ namespace pocketmine\event\player;
|
||||
|
||||
use pocketmine\entity\Human;
|
||||
use pocketmine\event\Cancellable;
|
||||
use pocketmine\event\entity\EntityEvent;
|
||||
use pocketmine\Player;
|
||||
|
||||
class PlayerExhaustEvent extends PlayerEvent implements Cancellable{
|
||||
class PlayerExhaustEvent extends EntityEvent implements Cancellable{
|
||||
public static $handlerList = null;
|
||||
|
||||
const CAUSE_ATTACK = 1;
|
||||
@ -47,14 +48,18 @@ class PlayerExhaustEvent extends PlayerEvent implements Cancellable{
|
||||
/** @var int */
|
||||
private $cause;
|
||||
|
||||
/** @var Human */
|
||||
protected $player;
|
||||
|
||||
public function __construct(Human $human, float $amount, int $cause){
|
||||
$this->entity = $human;
|
||||
$this->player = $human;
|
||||
$this->amount = $amount;
|
||||
$this->cause = $cause;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Human|Player
|
||||
* @return Human
|
||||
*/
|
||||
public function getPlayer(){
|
||||
return $this->player;
|
||||
|
Reference in New Issue
Block a user