Solved Detecting if a material can be colored

Discussion in 'Plugin Development' started by Betagear, Nov 11, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    Betagear

    Hi. Is there a simple way to detect if a material can be colored ?
     
  2. Offline

    Scimiguy

  3. Offline

    Lordloss

    If you mean leather armor... check if the material equals leather armor, get the itemMeta and cast it to LeatherArmorMeta.
     
  4. Offline

    mcdorli

    He can mean wool too.
     
  5. Offline

    Betagear

    Instead of using a long and rebarbative check testing if it belongs to Wool, Stained Clay, Stained Glass, Stained Glass Pane and whatever.
     
  6. Offline

    mcdorli

    Create an array with the corresponding materials, and use the .contains jeyword to check if the current material us un the array
     
  7. Offline

    Betagear

Thread Status:
Not open for further replies.

Share This Page