Ejemplo n.º 1
0
 public static function setCustomColorToArmor(Item $item, Color $color)
 {
     if ($hasTag = $item->hasCompoundTag()) {
         $tag = $item->getNamedTag();
     } else {
         $tag = new CompoundTag("", array());
     }
     $tag->customColor = new IntTag("customColor", $color->getColorCode());
     $item->setCompoundTag($tag);
     //
 }