Simple armor right click disabler

Discussion in 'Archived: Plugin Requests' started by ketchupcoke, May 4, 2013.

  1. Offline

    ketchupcoke

    Hey, i was wondering if someone would be able to make me a pretty simple plugin that stops the usage of right-clicking armor to instantly equip it. This has been causing trouble for me on my server, where classes that are restricted to certain armors can still used disabled armor by right clicking. I would make it myself but to be honest, i wouldnt have a clue where to start and im a bit of a programming noob :3. If it doesnt disable the entire thing, maybe permission nodes that block certain types of armor being right clicked? I would be very grateful if someone could make this for me, and im sure it wont take too long - i just dont know how :p.

    Thanks in advance!

    Bump

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 1, 2016
  2. Offline

    6P14y3r

    I need something like this too, because of Citizens (Blacksmith). Instead of repairing it at the Blacksmith-NPC you equip it. =(
     
  3. Offline

    Kuwoobie

    I also need a plugin that does this. Otherwise players can dupe armor with NPCs :'(
     
  4. Offline

    RickRaider

    You mean shift and right click that automatically equips the armour in the slot?
     
  5. Offline

    jokie666

    I think they mean when it is in the hotbar and they right-click
     
  6. Offline

    CMG

    I need something like this too, badly.
     
  7. Offline

    AndyMcB1

    Why not create this yourself? You've made a few plugins before.. And it's not that difficult.. When a player right clicks check if they're holding ID's (x, y, z) and if so cancel the event.
     
  8. Offline

    whitehooder

    Okay, I've smuck up a little test, it might not work with all plugins as it simply cancels the event (if the dev of the other plugin has used EventPriority.HIGHEST this plugin might cancel it before anything happened). If it does not work I will take a couple of minutes more to create a workaround for it ;)
    Link
     
    jacklin213 likes this.
  9. Offline

    bobacadodl

    Listen for PlayerInteractEvent at priority highest , then check if item in hand is armor. If so, event.setCancelled(). Then player.updateInventory() to un - equip the client sided armor
     
  10. Offline

    whitehooder

    exactly what I've done. But if some developers misunderstand the EventPriorities (Highest being run last) the plugin might cancel the event before the other plugin catches it.
     
  11. Offline

    CMG

    Thankyou sir, works like a dream :D
     
  12. Offline

    jacklin213

    oh wow EventPriority.HIGHEST <<< forgot about that
     

Share This Page