Chest: Remove redundant unpairing code from onBreak()

This is already done in the Level.
This commit is contained in:
Dylan K. Taylor 2018-01-03 12:08:35 +00:00
parent 06a3c7c478
commit 6ce728169e

View File

@ -101,16 +101,6 @@ class Chest extends Transparent{
return true; return true;
} }
public function onBreak(Item $item, Player $player = null) : bool{
$t = $this->getLevel()->getTile($this);
if($t instanceof TileChest){
$t->unpair();
}
$this->getLevel()->setBlock($this, BlockFactory::get(Block::AIR), true, true);
return true;
}
public function onActivate(Item $item, Player $player = null) : bool{ public function onActivate(Item $item, Player $player = null) : bool{
if($player instanceof Player){ if($player instanceof Player){