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] phoenix616library:inventorygui [2020/09/21 17:16] – [Adding to the GUI] Remove unnecessary parenthesis phoenix616
Line 83: 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 95: 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 105: 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!",