Discussion in 'Plugin Development' started by Betagear, Nov 11, 2015.
Hi. Is there a simple way to detect if a material can be colored ?
If you mean leather armor... check if the material equals leather armor, get the itemMeta and cast it to LeatherArmorMeta.
He can mean wool too.
Instead of using a long and rebarbative check testing if it belongs to Wool, Stained Clay, Stained Glass, Stained Glass Pane and whatever.
Create an array with the corresponding materials, and use the .contains jeyword to check if the current material us un the array
@mcdorli ok thanks.
Separate names with a comma.