Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
library:inventorygui [2020/09/14 23:15] – Added link to github repository phoenix616library:inventorygui [2020/09/21 17:16] – [Adding to the GUI] Remove unnecessary parenthesis phoenix616
Line 2: Line 2:
 A library that simplifies the creation of chest GUIs for Bukkit/Spigot plugins and  A library that simplifies the creation of chest GUIs for Bukkit/Spigot plugins and 
 allows assigning of the GUI to a specific InventoryHolder. If you are in need of a GUI for text inputs then take a look at [WesJD](https://github.com/WesJD)'s [AnvilGUI](https://github.com/WesJD/AnvilGUI) library. allows assigning of the GUI to a specific InventoryHolder. If you are in need of a GUI for text inputs then take a look at [WesJD](https://github.com/WesJD)'s [AnvilGUI](https://github.com/WesJD/AnvilGUI) library.
- 
-Please note that this is **not a plugin!** 
  
 Requires Java 8. Requires Java 8.
Line 85: Line 83:
     saveInv(inv); // Save inventory content or process it in some other way     saveInv(inv); // Save inventory content or process it in some other way
     return false; // Don't go back to the previous GUI (true would automatically go back to the previously opened one)     return false; // Don't go back to the previous GUI (true would automatically go back to the previously opened one)
-})+});
 ``` ```
 #### State Element #### State Element
Line 97: Line 95:
                     change.getEvent().getWhoClicked().sendMessage("You are now flying!");                     change.getEvent().getWhoClicked().sendMessage("You are now flying!");
                 },                 },
-                new ItemStack(Material.WOOL, 1, 5)), // the item to display as an icon+                new ItemStack(Material.WOOL, 1, 5), // the item to display as an icon
                 "flyingEnabled", // a key to identify this state by                 "flyingEnabled", // a key to identify this state by
                 ChatColor.GREEN + "Enable flying!", // explanation text what this element does                 ChatColor.GREEN + "Enable flying!", // explanation text what this element does
Line 107: Line 105:
                     change.getEvent().getWhoClicked().sendMessage("You are no longer flying!");                     change.getEvent().getWhoClicked().sendMessage("You are no longer flying!");
                 },                 },
-                new ItemStack(Material.WOOL, 1, 14)),+                new ItemStack(Material.WOOL, 1, 14),
                 "flyingDisabled",                 "flyingDisabled",
                 ChatColor.RED + "Disable flying!",                 ChatColor.RED + "Disable flying!",