mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-14 15:35:31 +00:00
Chest unpairing
This commit is contained in:
parent
176c371330
commit
5d6d30ed4e
@ -73,6 +73,10 @@ class ChestBlock extends TransparentBlock{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function onBreak(Item $item, Player $player){
|
public function onBreak(Item $item, Player $player){
|
||||||
|
$t = ServerAPI::request()->api->tile->get($this);
|
||||||
|
if($t !== false){
|
||||||
|
$t->unpair();
|
||||||
|
}
|
||||||
$this->level->setBlock($this, new AirBlock(), true, true);
|
$this->level->setBlock($this, new AirBlock(), true, true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user