Command equipping armor...?

Discussion in 'Spigot Plugin Development' started by iversen, Jun 15, 2015.

  1. Hey, I was wondering if it is possible to force-equip armor from a players inventory, to the players' armor slots?
    I know the plugin "Starterkit" does this, and I really like that feature. But I haven't really seen any other plugins having that feature, and I am really liking it - want to use it for a Kit PvP server, where it would be very useful.

    If this is possible, I'd be willing to pay someone to make it for me... ;3

    Thanks in advance!
  2. Find the armor in the inventory, remove it from their slots, place it in the armor slots. Pretty trivial
  3. Well, not really answering my question....
  4. Then what is your question?
  5. I can't guarantee this will work, but it will hopefully push you in the right direction. (if you want to make it yourself)

    Code (Text):
    ItemStack[] armourPieces = player.getInventory().getArmorContents(); //helmet is in index 0, chestplate is 1, etc.
    if(armourPieces[0] == null) // checking if there's not already a helmet equipped
    If you don't want to make it yourself, you're in the wrong board and should be posting this in :p
    • Informative Informative x 1
  6. The answer is yes.
    • Informative Informative x 2
  7. Thank you, I tried using 'KitEssentials', which has this feature