GUIAPI
GUI-API
GUIAPI is a simple API for creating menus/GUIs. These menus use a combination of custom inventories, custom items, and custom events in order to create an in-depth menu where the player clicks on a button (custom item) in a GUI (custom inventory) to cause custom events which allow for flexible menus. Non-Plugin Developers: This is just an API for other plugins to build upon. This Plugin does (nearly) nothing on its own, it needs a plugin to utilize this API. I made this after requiring an API of this sort for one of my other plugins (EnhancedSpawners), so I made one and decided to release a standalone edition of this API. I know, this kind of API has been done before, but I want to put my own spin on things :P . Also, if you ever need help, just PM me!
Documentation
Either visit here for my online JavaDocs repository or download it here (Scroll down to the release you are using and download the corresponding GUIAPIDoc.zip).
How to Utilize
Just add the plugin .jar to your build path and that's it!
Example Plugins:
Example built on GUIAPI version 1.0.1 demonstrating basic features here.
Current Features
- Easy-to-use constructors and methods
- Custom Events
- A debug mode
- In-depth documentation
Commands
- /toggletestmode -Toggles whether debug messages are on (only use if you know what you’re doing)
Permission Nodes
- GUIAPI.toggletestmode - For the /toggletestmode command
About the Config Options
- None currently
Changelog
Visit here
Planned Features
- Add more inventory types
- Expand the Button Object stuff and make it not only an internal mechanism
Plugins Utilizing this API
- EnhancedSpawners (internally, since it was made for that plugin)
Let me know if your plugin is using this API!
Known Issues
- None :)
Like This Plugin (API)?
Click the donate button on the top right of this page to support me!
This Project's Open-Source!
Check it out on Github!
https://github.com/austinv11/GUIAPI
Please post suggestions and comments and post issues on my issue-tracker!
Cool
@GamerKing195
I am using item2command for that ^-^ (combinated with this)
How would I use item meta or can I?
@dies134
It's an API plugin, it allows developers to make plugins with the plugin.
when the plugin gets installed on my server, it doesnt create a folder and only the plugin gets installrd
This plugin bloking 1.7.2 item copy bug?
How do i make something open another menu? like for example i want it when i click a NOTE_BLOCK to open the AdminGUI menu..
@austinv11
oh thanks
@LacianaServer
I just uploaded a new version (v1.0.5), in it i added a closeMenu() method to the MenuInteractEvent.
Once that is approved by the BukkitDev staff, all you'll have to do is use that method, here's an example:
can you post an example to when he click in a item the menu close?
Thank you very much. I hope it could be solved too.
@austinv11
@remilia1234567
I think I know the problem, I'll post a new release right now attempting to fix it. Hopefully it gets approved soon. If version 1.0.3 doesn't fix it, then it's likely a bug on Bukkit's side.
I hope it would not bring too much trouble to you since I don't know how to use the issue-tracker. I find a small problem when using this api which is about the "closeMenu()" method. It works well when I use the method just after I create a new Menu Class like "Menu exampleMenu = new Menu(player, ChatColor.GOLD+"Select an Item", 9);" . I use "exampleMenu.closeMenu();" and it really does close. But if I use it in the MenuInteractEvent, the menu does not close. "event.getMenu().closeMenu();" does not work when I click the button. But "event.getMenu().getMenuName()" could still give me the menu's name. So it shows that it does get the menu which I open, however, it could not close it. The GUI-API is great and I would like to use it in my plugins, so I really want to solve this problem, thank you.