use of cn.nukkit.utils.BlockColor in project Nukkit by Nukkit.
the class ItemColorArmor method getColor.
/**
* Get color of Leather Item
*
* @return - BlockColor, or null if item has no color
*/
public BlockColor getColor() {
if (!this.hasCompoundTag())
return null;
CompoundTag tag = this.getNamedTag();
if (!tag.exist("customColor"))
return null;
int rgb = tag.getInt("customColor");
return new BlockColor(rgb);
}
Aggregations