mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 02:08:21 +00:00
Item: Remove "ench" tag when all enchantments are removed from an item (#4184)
fixes #4144
This commit is contained in:
@ -339,7 +339,11 @@ class Item implements ItemIds, \JsonSerializable{
|
||||
}
|
||||
}
|
||||
|
||||
$this->setNamedTagEntry($ench);
|
||||
if($ench->getCount() > 0){
|
||||
$this->setNamedTagEntry($ench);
|
||||
}else{
|
||||
$this->removeNamedTagEntry(self::TAG_ENCH);
|
||||
}
|
||||
}
|
||||
|
||||
public function removeEnchantments() : void{
|
||||
|
Reference in New Issue
Block a user