mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-16 16:34:05 +00:00
Chest: Remove redundant unpairing code from onBreak()
This is already done in the Level.
This commit is contained in:
parent
06a3c7c478
commit
6ce728169e
@ -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){
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user