public function setCustomColor(Color $color) { if ($hasTag = $this->hasCompoundTag()) { $tag = $this->getNamedTag(); } else { $tag = new CompoundTag("", []); } $tag->customColor = new IntTag("customColor", $color->getColorCode()); $this->setCompoundTag($tag); }