InventoryClickEvent and EntityDamageEntity help

Discussion in 'Plugin Development' started by Unknown_Stalker_, Dec 3, 2013.

Thread Status:
Not open for further replies.
  1. Code:java
    1. @EventHandler
    2. public void onArmorTouch(InventoryClickEvent e){
    3. e.cancelled(true);
    4. }

    }
    i need help wit making it so its only the armor, so if they try to take off their armor it wouldn't work



    also i was wondering how would you check if a player has a item on their armor to mark that they're on a team

    team meaning the array list its on

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

    MOMOTHEREAL

  3. MOMOTHEREAL can't i just do if(e.getClick() == Clicked.ARMOR);
     
  4. Offline

    SourceForums

    Unknown_Stalker_
    Code:java
    1. if(event.getSlotType().equals(SlotType.ARMOR)){
    2. event.setCancelled(true);
    3. }
     
  5. Offline

    SourceForums

Thread Status:
Not open for further replies.

Share This Page