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:
@ -46,10 +46,10 @@ abstract class PlayerBucketEvent extends PlayerEvent implements Cancellable{
|
||||
* @param Item $bucket
|
||||
* @param Item $itemInHand
|
||||
*/
|
||||
public function __construct(Player $who, Block $blockClicked, $blockFace, Item $bucket, Item $itemInHand){
|
||||
public function __construct(Player $who, Block $blockClicked, int $blockFace, Item $bucket, Item $itemInHand){
|
||||
$this->player = $who;
|
||||
$this->blockClicked = $blockClicked;
|
||||
$this->blockFace = (int) $blockFace;
|
||||
$this->blockFace = $blockFace;
|
||||
$this->item = $itemInHand;
|
||||
$this->bucket = $bucket;
|
||||
}
|
||||
@ -59,7 +59,7 @@ abstract class PlayerBucketEvent extends PlayerEvent implements Cancellable{
|
||||
*
|
||||
* @return Item
|
||||
*/
|
||||
public function getBucket(){
|
||||
public function getBucket() : Item{
|
||||
return $this->bucket;
|
||||
}
|
||||
|
||||
@ -68,7 +68,7 @@ abstract class PlayerBucketEvent extends PlayerEvent implements Cancellable{
|
||||
*
|
||||
* @return Item
|
||||
*/
|
||||
public function getItem(){
|
||||
public function getItem() : Item{
|
||||
return $this->item;
|
||||
}
|
||||
|
||||
@ -82,14 +82,14 @@ abstract class PlayerBucketEvent extends PlayerEvent implements Cancellable{
|
||||
/**
|
||||
* @return Block
|
||||
*/
|
||||
public function getBlockClicked(){
|
||||
public function getBlockClicked() : Block{
|
||||
return $this->blockClicked;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getBlockFace(){
|
||||
public function getBlockFace() : int{
|
||||
return $this->blockFace;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user