Blacklisted wearing armor

Discussion in 'WorldGuard' started by jackob, Oct 29, 2017.

  1. jackob

    jackob New Member

    So bassicly some years ago this worked, player without 'warrior' group could not wear diamond armor.

    message=don't (%s)

    Now (1.12.2) player can put on and wear diamond armor. The only soulution i found is


    but then, player can't even pick the item for example; for his friend. How can i get it to work the way i want it?
  2. PseudoKnight

    PseudoKnight Well-Known Member Developer

    Given the specificity of what you're going for, you'll likely have to write your own functionality for that. "on-acquire" is the correct option to change there, as it's the only thing that covers the events that would allow a player to equip armor..

    I don't know why that would have worked before.
  3. wizjany

    wizjany Administrator Developer

    don't droppers put the armor on directly? what event is thrown for that by the server, if any?
  4. PseudoKnight

    PseudoKnight Well-Known Member Developer

    For dispensers, yes, and it only fires a generic BlockDispenseEvent as far as I can tell.

    So, presumably, the most complete way of making sure a player can't use certain types of armor is for a plugin to check the armor on a damage event.
  5. jackob

    jackob New Member

    Yeah, i already installed the plugin called ArmorPerms and it works almost as i wanted it to do. Thanks for Your help!
  6. PseudoKnight

    PseudoKnight Well-Known Member Developer

    I took a look at that plugin. It looks like it's checking armor on inventory close. So there's two ways for players to equip armor temporarily still: right-clicking while holding the armor, and using a dispenser.
  7. jackob

    jackob New Member

    Right, armor is equiped while using dispenser but the right-clicking while holding the armor is being blocked by the worldguard- that's the way it worked before i guess, i was just trying one way to put the armor on... But now i don't think that putting it on with dispenser is going to be such a pain. People are gonna open their inventories like 7 times in one minute :p
  8. PseudoKnight

    PseudoKnight Well-Known Member Developer

    Oh, so you're double-blocking it using two plugins. I see.
  9. PseudoKnight

    PseudoKnight Well-Known Member Developer

    Oh, it just occurred to me that you can use "on-dispense" for diamond armor. It's unlikely people will use this functionality normally. But because you're blocking diamond armor, some will try to get around it by using dispensers. So it would probably be okay to block diamond armor from being dispensed. It won't respect permissions, though, since the event doesn't know if it's spitting the armor out or onto a player.
  10. jackob

    jackob New Member


    Works perfectly. I can't find any other way to put it on now. Thank You very much :>