mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
Added typehints and PhpDoc for events API
excluded blocks and entities events API to avoid merge conflicts
This commit is contained in:
@ -32,12 +32,19 @@ class PlayerToggleSneakEvent extends PlayerEvent implements Cancellable{
|
||||
/** @var bool */
|
||||
protected $isSneaking;
|
||||
|
||||
public function __construct(Player $player, $isSneaking){
|
||||
/**
|
||||
* @param Player $player
|
||||
* @param bool $isSneaking
|
||||
*/
|
||||
public function __construct(Player $player, bool $isSneaking){
|
||||
$this->player = $player;
|
||||
$this->isSneaking = (bool) $isSneaking;
|
||||
$this->isSneaking = $isSneaking;
|
||||
}
|
||||
|
||||
public function isSneaking(){
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isSneaking() : bool{
|
||||
return $this->isSneaking;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user