Inventory Click Help

Discussion in 'Plugin Development' started by bjsnow, Mar 10, 2013.

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

    bjsnow

    This is code I found but can't work out how to do it..
    Code:
        @EventHandler
        public void onPlayerClick(InventoryClickEvent event){
            if(event.getInventory().getName().equals(inv.getName())){
                ItemStack is = event.getCurrentItem();
                ItemMeta im = is.getItemMeta();
                if(im.getDisplayName() != null && im.getDisplayName().equalsIgnoreCase("Survival!")){
                    //execute code here
                }
            }
        }
    
    But I need it so when the player clicks an item onto another item in the inventory it will do something.
     
  2. Offline

    GodzOfMadness

    Last edited by a moderator: May 31, 2016
Thread Status:
Not open for further replies.

Share This Page