Some fixes, thanks PhpStorm

This commit is contained in:
Dylan K. Taylor
2017-01-04 11:29:24 +00:00
parent 096836faaa
commit 1cb96d24ce
16 changed files with 28 additions and 20 deletions

View File

@ -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{

View File

@ -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
*/