AmpMenus Library v1.0: An object-oriented approach to handling Inventory Menus/GUIs in Bukkit. AmpMenus is intended for advanced use cases such as the following examples: Attribute Allocation Menu Displays the player's current attribute amounts on the attribute items Increase and decrease the points to add by clicking the wool above/below the attribute items Display the increase points item as green wool if the player has enough attribute points to increase the attribute Display the decrease points item as red wool if the player has actually increased the attribute Confirm or cancel point selection Capture The Flag Shop Display the next available tier of different classes and perks Because the items in these menus behave differently depending on the player and certain data or conditions, they would not be possible with a traditional plugin such as http://dev.bukkit.org/bukkit-plugins/chest-commands/ and would be impractical to create with a simpler utility such as https://forums.bukkit.org/threads/icon-menu.108342/ Maven Add the following repository: Spoiler (Move your mouse to the spoiler area to reveal the content) Show Spoiler Hide Spoiler HTML: <repository> <id>greatman-repo</id> <url>http://repo.greatmancode.com/content/groups/public/</url> </repository> And the following dependency: Spoiler (Move your mouse to the spoiler area to reveal the content) Show Spoiler Hide Spoiler HTML: <dependency> <groupId>ninja.amp</groupId> <artifactId>ampmenus</artifactId> <version>1.4-SNAPSHOT</version> <!-- Use LATEST for latest dev build --> <scope>compile</scope> </dependency> And if you want the code to be shaded into your plugin, add the following build plugin: Spoiler (Move your mouse to the spoiler area to reveal the content) Show Spoiler Hide Spoiler HTML: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>1.7.1</version> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> <configuration> <artifactSet> <includes> <include>ninja.amp:ampmenus</include> </includes> </artifactSet> </configuration> </execution> </executions> </plugin> For code example, usage and additional information: View the README.md on Github MenuItems for Minigame Shop Menus Helpful Links: Source code Javadocs Jenkins Message me (Ampayne2) on IRC at irc.esper.net, i'm always happy to help. If you make something cool, let me know - I'd be glad to feature it as an example Replies welcome, thanks for reading! Change LogUpdate 8/28/2014:Bumped version number from 1.3 to 1.4Removed the unnecessary ItemClickEventHandler class in this commit, it was kinda pointless as the only implementation was MenuItem and it wasn't possible to use custom implementations. Update 8/12/2014:Bumped version number from 1.2 to 1.3Removed the line in the constructor of an ItemMenu that automatically registers the MenuListener in this commit - make sure you register it in on enable or before players can open menus. Update 8/4/2014:Bumped version number from 1.1 to 1.2Removed the Menu interfaceAdded a Size enum for ItemMenus instead of using raw slot amounts Update 8/4/2014:Moved separate ItemMenu listeners into a global MenuListener in these commits.The global listener automatically registers itself when any ItemMenu instance is created. When a menu is being opened for a player it first checks to make sure the listener is registered and if not, registers it. It works as expected for plugins that don't reload or unregister their own listeners, or even for plugins that have reload functionality in their plugin and immediately instantiate new ItemMenus. There is one unlikely situation which could cause issues - if a player has a menu open, and the plugin's listeners are unregistered without the menu listener being re-registered immediately. You won't run into this issue if your plugin meets any of these requirements: Doesn't have reload functionality or doesn't unregister listeners. Instantiates its ItemMenus on enable, so that even if the menu listener is unregistered in a reload, it is immediately re-registered. Calls MenuListener.getInstance().register(JavaPlugin plugin) on enable or as soon as possible after the plugin's listeners are unregistered. Note: If you meet the previous requirement you don't need this, as it is done automatically. I also added a method to close all open menus, MenuListener#closeOpenMenus(). The MenuListener automatically calls this method if a PluginDisableEvent is called for the plugin to help prevent the above issue. Update 8/3/2014: ItemMenu listeners now use EventPriority.HIGHEST Added a StaticMenuItem which should be used for MenuItems whose icons will rarely or never change. Instead of displaying a clone of the base icon with the display name and lore applied, it displays the base icon. The base icon of a MenuItem is returned by getIcon() and can still be modified. The gray glass panes which filled empty slots and were removed in this pull request have been added back as an optional feature. Just call ItemMenu#fillEmptySlots() to fill with the gray glass panes or ItemMenu#fillEmptySlots(MenuItem menuItem) to fill with a MenuItem of your choosing. Update 7/24/2014: Changed group id from me.ampayne2 to ninja.amp Bumped version number from 1.0 to 1.1 To use versions past 1.0 you will have to update your pom.xml and old imports Update 7/23/2014: Accepted this pull request removing gray glass panes filling empty slots Update 7/21/2014: Added example MenuItems for a minigame shop menu here EDIT by Moderator: merged posts, please use the edit button instead of double posting.