PHP: public function setNbt($item){ if(($hasTag = $item->hasCompoundTag())){ $tag = $item->getNamedTag(); }else{ $tag = new CompoundTag("", []); } $tag->customColor = new IntTag("customColor", 5); //or 6, 7, 8, 9... $item->setCompoundTag($tag); return $item; }
https://forums.pmmp.io/threads/give-dyed-leather-armor.2665/#post-28438 https://forums.pmmp.io/threads/how-to-dye-leather-armor.2862/#post-28944 https://github.com/pmmp/PocketMine-MP/blob/api3/blocks/src/pocketmine/item/Armor.php#L82L86
Look like 14 minute ago xD https://github.com/pmmp/PocketMine-MP/commit/9da19b5f15e870d28eb03842b9ab6cc7add742db