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

@ -78,7 +78,7 @@ class ItemFrame extends Flowable{
return true;
}
public function onBreak(Item $item) : bool{
public function onBreak(Item $item, Player $player = null) : bool{
$tile = $this->level->getTile($this);
if($tile instanceof TileItemFrame){
//TODO: add events
@ -86,7 +86,7 @@ class ItemFrame extends Flowable{
$this->level->dropItem($tile->getBlock(), $tile->getItem());
}
}
return parent::onBreak($item);
return parent::onBreak($item, $player);
}
public function onUpdate(int $type){