mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
Added CanDestroy and Lock tag
This commit is contained in:
@ -158,6 +158,11 @@ class Chest extends Transparent{
|
||||
$chest = Tile::createTile("Chest", $this->getLevel()->getChunk($this->x >> 4, $this->z >> 4), $nbt);
|
||||
}
|
||||
|
||||
if(isset($chest->namedtag->Lock) and $chest->namedtag->Lock instanceof String){
|
||||
if($chest->namedtag->Lock->getValue() !== $item->getCustomName()){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if($player->isCreative()){
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user