I am making a GUI type plugin, I need to have items put in Seperate areas of the gui like, the 32 slot is a piece of dirt and the 34 is grass, No other items in the gui, If someone could help me that would be appreciated.
I don't know maybe clicking from chat and maybe this is you want Code: public class GUI extends JavaPlugin implements Listener { public static Inventory myInventory = Bukkit.createInventory( null , 9 , ChatColor.BLACK + "GUI"); static { myInventory.setItem(0,item01); myInventory.setItem(1,item02); } @EventHandler public void onInventoryClick(InventoryClickEvent e) { Player p = (Player) e.getWhoClicked(); Inventory inventory = e.getInventory(); if(inventory.getName().equals(myInventory.getName())){ if(e.getClick()==ClickType.RIGHT || e.getClick()==ClickType.LEFT) { e.setCancelled(true); if(e.getCurrentItem().equals(item01)){ p.performCommand(""); } if(e.getCurrentItem().equals(item02)){ p.performCommand(""); } } } } public boolean onCommand(CommandSender sender , Command cmd , String lable , String[] args) { if(lable.equalsIgnoreCase("gui")){ Player p = (Player) sender; p.openInventory(myInventory); } } }