mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 08:17:34 +00:00
Fixed some minor issues in Player events API
This commit is contained in:
parent
9e54980ded
commit
b62597fe63
@ -45,7 +45,7 @@ class PlayerAnimationEvent extends PlayerEvent implements Cancellable{
|
||||
* @param Player $player
|
||||
* @param int $animation
|
||||
*/
|
||||
public function __construct(Player $player, $animation = self::ARM_SWING){
|
||||
public function __construct(Player $player, int $animation){
|
||||
$this->player = $player;
|
||||
$this->animationType = $animation;
|
||||
}
|
||||
|
@ -30,7 +30,4 @@ use pocketmine\Player;
|
||||
class PlayerBucketEmptyEvent extends PlayerBucketEvent{
|
||||
public static $handlerList = null;
|
||||
|
||||
public function __construct(Player $who, Block $blockClicked, $blockFace, Item $bucket, Item $itemInHand){
|
||||
parent::__construct($who, $blockClicked, $blockFace, $bucket, $itemInHand);
|
||||
}
|
||||
}
|
@ -31,6 +31,9 @@ use pocketmine\Player;
|
||||
class PlayerDeathEvent extends EntityDeathEvent{
|
||||
public static $handlerList = null;
|
||||
|
||||
/** @var Player */
|
||||
protected $entity;
|
||||
|
||||
/** @var TextContainer|string */
|
||||
private $deathMessage;
|
||||
private $keepInventory = false;
|
||||
@ -48,7 +51,7 @@ class PlayerDeathEvent extends EntityDeathEvent{
|
||||
/**
|
||||
* @return Player
|
||||
*/
|
||||
public function getEntity() : Player{
|
||||
public function getEntity(){
|
||||
return $this->entity;
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user