Fixed double plants and beds sometimes dropping in creative

This commit is contained in:
Dylan K. Taylor
2017-08-21 19:25:04 +01:00
parent 592ce3c9e9
commit b8ade18888
8 changed files with 26 additions and 20 deletions

View File

@ -26,6 +26,7 @@ namespace pocketmine\block;
use pocketmine\item\Item;
use pocketmine\item\Tool;
use pocketmine\level\Level;
use pocketmine\Player;
class Ice extends Transparent{
@ -51,7 +52,7 @@ class Ice extends Transparent{
return Tool::TYPE_PICKAXE;
}
public function onBreak(Item $item) : bool{
public function onBreak(Item $item, Player $player = null) : bool{
$this->getLevel()->setBlock($this, BlockFactory::get(Block::WATER), true);
return true;