Fixed some minor issues in Player events API

This commit is contained in:
Dylan K. Taylor 2017-08-21 13:05:32 +01:00
parent 9e54980ded
commit b62597fe63
4 changed files with 6 additions and 6 deletions

View File

@ -45,7 +45,7 @@ class PlayerAnimationEvent extends PlayerEvent implements Cancellable{
* @param Player $player * @param Player $player
* @param int $animation * @param int $animation
*/ */
public function __construct(Player $player, $animation = self::ARM_SWING){ public function __construct(Player $player, int $animation){
$this->player = $player; $this->player = $player;
$this->animationType = $animation; $this->animationType = $animation;
} }

View File

@ -30,7 +30,4 @@ use pocketmine\Player;
class PlayerBucketEmptyEvent extends PlayerBucketEvent{ class PlayerBucketEmptyEvent extends PlayerBucketEvent{
public static $handlerList = null; public static $handlerList = null;
public function __construct(Player $who, Block $blockClicked, $blockFace, Item $bucket, Item $itemInHand){
parent::__construct($who, $blockClicked, $blockFace, $bucket, $itemInHand);
}
} }

View File

@ -31,6 +31,9 @@ use pocketmine\Player;
class PlayerDeathEvent extends EntityDeathEvent{ class PlayerDeathEvent extends EntityDeathEvent{
public static $handlerList = null; public static $handlerList = null;
/** @var Player */
protected $entity;
/** @var TextContainer|string */ /** @var TextContainer|string */
private $deathMessage; private $deathMessage;
private $keepInventory = false; private $keepInventory = false;
@ -48,7 +51,7 @@ class PlayerDeathEvent extends EntityDeathEvent{
/** /**
* @return Player * @return Player
*/ */
public function getEntity() : Player{ public function getEntity(){
return $this->entity; return $this->entity;
} }

View File

@ -22,7 +22,7 @@
declare(strict_types=1); declare(strict_types=1);
/** /**
* Events called when a player attempts to cheat * Events called when the server detected that a player is cheating
*/ */
namespace pocketmine\event\player\cheat; namespace pocketmine\event\player\cheat;