Inventory: remove redundant return values

This commit is contained in:
Dylan K. Taylor
2019-05-20 16:30:00 +01:00
parent c21a25efb9
commit d6ce3f82b1
7 changed files with 29 additions and 58 deletions

View File

@@ -119,16 +119,10 @@ class PlayerInventory extends BaseInventory{
* Sets the item in the currently-held slot to the specified item.
*
* @param Item $item
*
* @return bool
*/
public function setItemInHand(Item $item) : bool{
if($this->setItem($this->getHeldItemIndex(), $item)){
$this->sendHeldItem($this->holder->getViewers());
return true;
}
return false;
public function setItemInHand(Item $item) : void{
$this->setItem($this->getHeldItemIndex(), $item);
$this->sendHeldItem($this->holder->getViewers());
}
/**