mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Improved PlayerInventory->setItemInHand() $source call, fixed Tool durability
This commit is contained in:
@ -89,11 +89,12 @@ class PlayerInventory extends BaseInventory{
|
||||
|
||||
/**
|
||||
* @param Item $item
|
||||
* @param $source
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function setItemInHand(Item $item){
|
||||
return $this->setItem($this->getHeldItemSlot(), $item);
|
||||
public function setItemInHand(Item $item, $source = null){
|
||||
return $this->setItem($this->getHeldItemSlot(), $item, $source);
|
||||
}
|
||||
|
||||
public function getHeldItemSlot(){
|
||||
|
Reference in New Issue
Block a user