mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +00:00
phpdoc armageddon for master, pass 1
This commit is contained in:
@ -35,9 +35,6 @@ class PlayerInventory extends BaseInventory{
|
||||
/** @var int */
|
||||
protected $itemInHandIndex = 0;
|
||||
|
||||
/**
|
||||
* @param Human $player
|
||||
*/
|
||||
public function __construct(Human $player){
|
||||
$this->holder = $player;
|
||||
parent::__construct(36);
|
||||
@ -48,8 +45,6 @@ class PlayerInventory extends BaseInventory{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $slot
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
private function throwIfNotHotbarSlot(int $slot) : void{
|
||||
@ -61,10 +56,6 @@ class PlayerInventory extends BaseInventory{
|
||||
/**
|
||||
* Returns the item in the specified hotbar slot.
|
||||
*
|
||||
* @param int $hotbarSlot
|
||||
*
|
||||
* @return Item
|
||||
*
|
||||
* @throws \InvalidArgumentException if the hotbar slot index is out of range
|
||||
*/
|
||||
public function getHotbarSlotItem(int $hotbarSlot) : Item{
|
||||
@ -74,7 +65,6 @@ class PlayerInventory extends BaseInventory{
|
||||
|
||||
/**
|
||||
* Returns the hotbar slot number the holder is currently holding.
|
||||
* @return int
|
||||
*/
|
||||
public function getHeldItemIndex() : int{
|
||||
return $this->itemInHandIndex;
|
||||
@ -104,8 +94,6 @@ class PlayerInventory extends BaseInventory{
|
||||
|
||||
/**
|
||||
* Returns the currently-held item.
|
||||
*
|
||||
* @return Item
|
||||
*/
|
||||
public function getItemInHand() : Item{
|
||||
return $this->getHotbarSlotItem($this->itemInHandIndex);
|
||||
@ -113,8 +101,6 @@ class PlayerInventory extends BaseInventory{
|
||||
|
||||
/**
|
||||
* Sets the item in the currently-held slot to the specified item.
|
||||
*
|
||||
* @param Item $item
|
||||
*/
|
||||
public function setItemInHand(Item $item) : void{
|
||||
$this->setItem($this->getHeldItemIndex(), $item);
|
||||
@ -125,7 +111,6 @@ class PlayerInventory extends BaseInventory{
|
||||
|
||||
/**
|
||||
* Returns the number of slots in the hotbar.
|
||||
* @return int
|
||||
*/
|
||||
public function getHotbarSize() : int{
|
||||
return 9;
|
||||
|
Reference in New Issue
Block a user