mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Chest unpairing
This commit is contained in:
parent
176c371330
commit
5d6d30ed4e
1 changed files with 6 additions and 2 deletions
|
|
@ -73,8 +73,12 @@ class ChestBlock extends TransparentBlock{
|
|||
}
|
||||
|
||||
public function onBreak(Item $item, Player $player){
|
||||
$this->level->setBlock($this, new AirBlock(), true, true);
|
||||
return true;
|
||||
$t = ServerAPI::request()->api->tile->get($this);
|
||||
if($t !== false){
|
||||
$t->unpair();
|
||||
}
|
||||
$this->level->setBlock($this, new AirBlock(), true, true);
|
||||
return true;
|
||||
}
|
||||
|
||||
public function onActivate(Item $item, Player $player){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue