Disable putting on armor

Discussion in 'Plugin Development' started by vtg_the_kid, May 12, 2014.

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

    vtg_the_kid

    Hi guys
    how would i disable armor wearing of any kind (right click, inventory click)
    is there an event?
    thanks!
    Edit: mcpvp did this with the anchor kit where boots couldn't be worn, so I know it's not impossible
     
  2. Offline

    Bailey Payne

    When a player puts any armor piece on, you need to cancel the event with event.setCancelled();

    I think you would use either InventoryMoveEvent or InventoryInteractEvent then check if they put armor in their bar, so an if statement to see if the armor contents returns null, if it doesn't, and there is armor there you can just clear it maybe.
     
Thread Status:
Not open for further replies.

Share This Page