mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 10:53:05 +00:00
phpdoc armageddon for master, pass 1
This commit is contained in:
@ -46,9 +46,6 @@ class CraftItemEvent extends Event implements Cancellable{
|
||||
private $outputs;
|
||||
|
||||
/**
|
||||
* @param CraftingTransaction $transaction
|
||||
* @param CraftingRecipe $recipe
|
||||
* @param int $repetitions
|
||||
* @param Item[] $inputs
|
||||
* @param Item[] $outputs
|
||||
*/
|
||||
@ -62,8 +59,6 @@ class CraftItemEvent extends Event implements Cancellable{
|
||||
|
||||
/**
|
||||
* Returns the inventory transaction involved in this crafting event.
|
||||
*
|
||||
* @return CraftingTransaction
|
||||
*/
|
||||
public function getTransaction() : CraftingTransaction{
|
||||
return $this->transaction;
|
||||
@ -71,8 +66,6 @@ class CraftItemEvent extends Event implements Cancellable{
|
||||
|
||||
/**
|
||||
* Returns the recipe crafted.
|
||||
*
|
||||
* @return CraftingRecipe
|
||||
*/
|
||||
public function getRecipe() : CraftingRecipe{
|
||||
return $this->recipe;
|
||||
@ -81,8 +74,6 @@ class CraftItemEvent extends Event implements Cancellable{
|
||||
/**
|
||||
* Returns the number of times the recipe was crafted. This is usually 1, but might be more in the case of recipe
|
||||
* book shift-clicks (which craft lots of items in a batch).
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getRepetitions() : int{
|
||||
return $this->repetitions;
|
||||
@ -106,9 +97,6 @@ class CraftItemEvent extends Event implements Cancellable{
|
||||
return $this->outputs;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Player
|
||||
*/
|
||||
public function getPlayer() : Player{
|
||||
return $this->transaction->getSource();
|
||||
}
|
||||
|
@ -41,11 +41,6 @@ class FurnaceBurnEvent extends BlockEvent implements Cancellable{
|
||||
/** @var bool */
|
||||
private $burning = true;
|
||||
|
||||
/**
|
||||
* @param Furnace $furnace
|
||||
* @param Item $fuel
|
||||
* @param int $burnTime
|
||||
*/
|
||||
public function __construct(Furnace $furnace, Item $fuel, int $burnTime){
|
||||
parent::__construct($furnace->getBlock());
|
||||
$this->fuel = $fuel;
|
||||
@ -53,44 +48,26 @@ class FurnaceBurnEvent extends BlockEvent implements Cancellable{
|
||||
$this->furnace = $furnace;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Furnace
|
||||
*/
|
||||
public function getFurnace() : Furnace{
|
||||
return $this->furnace;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Item
|
||||
*/
|
||||
public function getFuel() : Item{
|
||||
return $this->fuel;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getBurnTime() : int{
|
||||
return $this->burnTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $burnTime
|
||||
*/
|
||||
public function setBurnTime(int $burnTime) : void{
|
||||
$this->burnTime = $burnTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isBurning() : bool{
|
||||
return $this->burning;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $burning
|
||||
*/
|
||||
public function setBurning(bool $burning) : void{
|
||||
$this->burning = $burning;
|
||||
}
|
||||
|
@ -39,11 +39,6 @@ class FurnaceSmeltEvent extends BlockEvent implements Cancellable{
|
||||
/** @var Item */
|
||||
private $result;
|
||||
|
||||
/**
|
||||
* @param Furnace $furnace
|
||||
* @param Item $source
|
||||
* @param Item $result
|
||||
*/
|
||||
public function __construct(Furnace $furnace, Item $source, Item $result){
|
||||
parent::__construct($furnace->getBlock());
|
||||
$this->source = clone $source;
|
||||
@ -52,30 +47,18 @@ class FurnaceSmeltEvent extends BlockEvent implements Cancellable{
|
||||
$this->furnace = $furnace;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Furnace
|
||||
*/
|
||||
public function getFurnace() : Furnace{
|
||||
return $this->furnace;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Item
|
||||
*/
|
||||
public function getSource() : Item{
|
||||
return $this->source;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Item
|
||||
*/
|
||||
public function getResult() : Item{
|
||||
return $this->result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Item $result
|
||||
*/
|
||||
public function setResult(Item $result) : void{
|
||||
$this->result = $result;
|
||||
}
|
||||
|
@ -30,18 +30,11 @@ class InventoryCloseEvent extends InventoryEvent{
|
||||
/** @var Player */
|
||||
private $who;
|
||||
|
||||
/**
|
||||
* @param Inventory $inventory
|
||||
* @param Player $who
|
||||
*/
|
||||
public function __construct(Inventory $inventory, Player $who){
|
||||
$this->who = $who;
|
||||
parent::__construct($inventory);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Player
|
||||
*/
|
||||
public function getPlayer() : Player{
|
||||
return $this->who;
|
||||
}
|
||||
|
@ -38,9 +38,6 @@ abstract class InventoryEvent extends Event{
|
||||
$this->inventory = $inventory;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Inventory
|
||||
*/
|
||||
public function getInventory() : Inventory{
|
||||
return $this->inventory;
|
||||
}
|
||||
|
@ -34,18 +34,11 @@ class InventoryOpenEvent extends InventoryEvent implements Cancellable{
|
||||
/** @var Player */
|
||||
private $who;
|
||||
|
||||
/**
|
||||
* @param Inventory $inventory
|
||||
* @param Player $who
|
||||
*/
|
||||
public function __construct(Inventory $inventory, Player $who){
|
||||
$this->who = $who;
|
||||
parent::__construct($inventory);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Player
|
||||
*/
|
||||
public function getPlayer() : Player{
|
||||
return $this->who;
|
||||
}
|
||||
|
@ -34,18 +34,11 @@ class InventoryPickupArrowEvent extends InventoryEvent implements Cancellable{
|
||||
/** @var Arrow */
|
||||
private $arrow;
|
||||
|
||||
/**
|
||||
* @param Inventory $inventory
|
||||
* @param Arrow $arrow
|
||||
*/
|
||||
public function __construct(Inventory $inventory, Arrow $arrow){
|
||||
$this->arrow = $arrow;
|
||||
parent::__construct($inventory);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Arrow
|
||||
*/
|
||||
public function getArrow() : Arrow{
|
||||
return $this->arrow;
|
||||
}
|
||||
|
@ -34,18 +34,11 @@ class InventoryPickupItemEvent extends InventoryEvent implements Cancellable{
|
||||
/** @var ItemEntity */
|
||||
private $item;
|
||||
|
||||
/**
|
||||
* @param Inventory $inventory
|
||||
* @param ItemEntity $item
|
||||
*/
|
||||
public function __construct(Inventory $inventory, ItemEntity $item){
|
||||
$this->item = $item;
|
||||
parent::__construct($inventory);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ItemEntity
|
||||
*/
|
||||
public function getItem() : ItemEntity{
|
||||
return $this->item;
|
||||
}
|
||||
|
@ -38,16 +38,10 @@ class InventoryTransactionEvent extends Event implements Cancellable{
|
||||
/** @var InventoryTransaction */
|
||||
private $transaction;
|
||||
|
||||
/**
|
||||
* @param InventoryTransaction $transaction
|
||||
*/
|
||||
public function __construct(InventoryTransaction $transaction){
|
||||
$this->transaction = $transaction;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return InventoryTransaction
|
||||
*/
|
||||
public function getTransaction() : InventoryTransaction{
|
||||
return $this->transaction;
|
||||
}
|
||||
|
Reference in New Issue
Block a user