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.
bjsnow i don't know if it's you (minezbot) but you don't need to post this thread when you(or not you) has a thread talking about this specific piece of code at the moment. Thread: http://forums.bukkit.org/threads/getting-what-the-player-clicks-in-there-inventory.133947/ EDIT by Moderator: merged posts, please use the edit button instead of double posting.