So i'm starting up a new plugin which basically makes chain armor stronger than diamond armor (This is just so I know how to work with armor I won't be releasing it ). My question is how would i make sure that when i use getArmorContents() that the armor i'm getting is chainmail? Also would I have to use a hashmap? (I'm pretty much 100% sure I do) I've looked through the javadocs and stuff but i'm honestly not sure :S. Please explain and/or maybe provide examples? (I hope this doesn't sound too stupid xD) EDIT: Just realized i posted this in the wrong section, but not sure how to remove it D:
Code: org.bukkit.inventory.ItemStack[] armor = player.getInventory().getArmorContents(); if (armor[0].getType() == Material.CHAINMAIL_HELMET) { // player is wearing a chainmail helmet } if (armor[1].getType() == Material.CHAINMAIL_CHESTPLATE) { // player is wearing a chainmail chestplate } if (armor[2].getType() == Material.CHAINMAIL_LEGGINGS) { // player is wearing chainmail leggings } if (armor[3].getType() == Material.CHAINMAIL_BOOTS) { // player is wearing chainmail boots }