mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Make use of CompoundTag->hasTag()
This commit is contained in:
@ -51,7 +51,7 @@ class Chest extends Spawnable implements InventoryHolder, Container, Nameable{
|
||||
parent::__construct($level, $nbt);
|
||||
$this->inventory = new ChestInventory($this);
|
||||
|
||||
if(!($this->namedtag->getTag("Items") instanceof ListTag)){
|
||||
if(!$this->namedtag->hasTag("Items", ListTag::class)){
|
||||
$this->namedtag->setTag(new ListTag("Items", [], NBT::TAG_Compound));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user