mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 02:08:21 +00:00
Some fixes, thanks PhpStorm
This commit is contained in:
@ -52,7 +52,7 @@ class Bucket extends Item{
|
||||
if(!$ev->isCancelled()){
|
||||
$player->getLevel()->setBlock($target, new Air(), true, true);
|
||||
if($player->isSurvival()){
|
||||
$player->getInventory()->setItemInHand($ev->getItem(), $player);
|
||||
$player->getInventory()->setItemInHand($ev->getItem());
|
||||
}
|
||||
return true;
|
||||
}else{
|
||||
@ -66,7 +66,7 @@ class Bucket extends Item{
|
||||
if(!$ev->isCancelled()){
|
||||
$player->getLevel()->setBlock($block, $targetBlock, true, true);
|
||||
if($player->isSurvival()){
|
||||
$player->getInventory()->setItemInHand($ev->getItem(), $player);
|
||||
$player->getInventory()->setItemInHand($ev->getItem());
|
||||
}
|
||||
return true;
|
||||
}else{
|
||||
|
@ -787,7 +787,8 @@ class Item implements ItemIds, \JsonSerializable{
|
||||
/**
|
||||
* Serializes the item to an NBT CompoundTag
|
||||
*
|
||||
* @param int $slot optional, the inventory slot of the item
|
||||
* @param int $slot optional, the inventory slot of the item
|
||||
* @param string $tagName the name to assign to the CompoundTag object
|
||||
*
|
||||
* @return CompoundTag
|
||||
*/
|
||||
|
Reference in New Issue
Block a user