public static function clearCustomColorToArmor(Item $item) { if (!$item->hasCompoundTag()) { return; } $tag = $item->getNamedTag(); if (isset($tag->customColor)) { unset($tag->customColor); } $item->setCompoundTag($tag); // }