Create a GUI

Discussion in 'Spigot Plugin Development' started by ProJoosh, May 29, 2015.

  1. Hey so whats the way now to create a GUI e.g. 1 Row and 8 Columns with a custom title and run somthing when a player clicks a item in that gui. ?
  2. Bukkit.createInventory (InventoryHolder holder, int slots, string title);

    Inventory inventory = Bukkit.createInventory (null, 9, "This is a GUI");

    You use the InventoryClickEvent to check what item has been clicked.

    (I'm on my phone doing this off the top of my head, excuse me if I am wrong).
    • Like Like x 1
  3. They have to be multiples of nine.
    • Like Like x 1
    • Agree Agree x 1