MenuService
General Description
MenuService is a plugin and API which allows plugins to create and use complex menu systems.
Status Update
It's been a long time since an update. I'm sorry for keeping everyone in the dark. With the start of the fall semester, I've been really busy with all of my classes. I've made some large updates to the plugin and have just released a new Beta version. Note that this version is still a beta; there are probably plenty of errors and missing features. Please give it a try and let me know what you find.
MenuService is open source. you can see the source on Github. https://github.com/m0pt0pmatt/MenuService
You can get a 1.6.2 version of the latest jar here: MenuService v0.8 for 1.6.2 For developers, you can get a 1.6.2 version of the latest API here: MenuService API v0.8 for 1.6.2
If you want to see the planned features, check out this Google Document. See what work is being done!
Permissions
Commands
Documentation
I'm working on making some simple tutorials. An example of a menu config file can be found here. Check out this tutorial for beginners: Check it out! Check out this tutorial for developers: Check it out!
Today, I moved classes around for hours!
But needless to say, I'm making good progress. The menus can now be shown through my new API.
Next up, testing the actions...
@m0pt0pmatt
Can't wait to use this!
@MaienM
Right now I'm working on itemmenus and command menus. Spout menus will come later, after I finish everything else.
That all sounds very promising. I like the abstraction you're using, decoupling the contents of a menu from the output format of the menu. Being able to create one menu and then show it knowing the users will get the best interface they can get based on their plugins is great (e.g. spout for those that have it, item menu's for those that don't).
One small question: is spout (and other client-side gui libraries) something you're actively working on, or is it something that will/might get added later?
Two weeks sounds like a very reasonable time period. But please, don't sweat it if you don't make it. As long as you keep us posted I'm sure everyone will understand. Being developers we all know that deadlines suck ;)
Status Update: So because of the holiday, I didn't write that many lines of code, but instead of taken a lot of time to think through how the plugin should work.
Needless to say, it's pretty complicated on my end, but your end will be easy and full of possible features.
Once I get some stuff working smoothly, I'll post a video sowing how things will look for the developer. Thanks for the support. Hopefully I can get a working jar in two weeks.
For those who are interested, I can break down what I have so far. Note that this is TENTATIVE, so nothing I say now is permanent.
The new plugin will act as a service provider for other plugins that want to implement menus. Menus are abstract objects that are defined by Attributes. Menu's have components which also can have attributes. As the developer, you can give any number of attributes to anything.
These attributes are used to render the Menu. Menu's can be rendered multiple ways, the default being an ItemMenu. However, the same menu could also ge rendered via a command interface or a spout menu. (In theory). Attributes are used only when they are compatible with the type of menu being created.
Now, I know this sounds crazy complicated, but for you it isn't. All it means is that menus can be very well defined so they look good in all sorts of forms. As for how menu's are created, there are a couple of methods.
The first method for creating a Menu is the one you are used to: the plugin will have an API for creating menus. If you would rather avoid the code, you can create menus from a config file format, and load the menus from the config file. Lastly, menus will be able to be created interactively.
To have the player be shown the menu, the menu will have to be registered by a MenuListener. The MenuListener will keep track of open menus and update them accordingly.
Each MenuComponent in a Menu can have a list of Actions. Actions are caught by the MenuListener. As a developer, you can catch Actions (which are like Events) and execute your code accordingly.
As for what's done, I've got basic config file setup working and a very basic ItemMenu displaying. However, I'm still working on the Action catching, menu interaction, and menu listening. I would show what I have for the config file, but it's not quite ready to show.
@MaienM
At least two more weeks until I post a jar
@MaienM
That's a hard question to answer. There's still a lot more to do, but how long it takes depends on how hard the next few parts will be to implement. I've got one more tough problem to face. From there, the plugin would be useable, but not very featured. I'll give a full status update later this evening, after I do some more work.
How's the plugin revamp coming along? Any rough ETA? As in, "it's mostly done and will be released soon-ish", or "I just started and you best not hold your breath"?
@Dupstal
This plugin is being completely redone, so I can't answer questions right now, as everything is subject to change (including colored text)
As for the kit itemmenu thing, that sounds like that would be up to you to do.
Please help me! Whenever I try to make a color code with § it writes an " Á " character in front of the name of the item! And one more thing: Is it possible to make a kit itemmenu? Like in hypixel's server. Whenever you join to the server you get a kit AND you can use that kit for an itemmenu. e.g: You type /kit tools and all items are binded to a menu. pls answer :-)
@wannywanson
Sorry...I'm totally not. The current file structure is too limited for my needs. Don't worry though, I'm trying to make the new file structure powerful and easy (which isn't easy to do :P)
But I digress, once I am done, the file system should stay the same. So hopefully this will be the only painful switch.
@m0pt0pmatt
I look forward to using your new API. I feel it's unnecessary to use it now if you're going to change it all. Thanks. Keep us posted!
@m0pt0pmatt
Are you keeping the menu file structure so we don't have to re-write everything again?
Just a quick comment, I can not answer any bug related questions, as I'm completely changing the source code.
When the new version is done, it will be completely different. I'm sure there will be a whole new batch of errors for me to solve :)
This plugin outputs this error to the console every now and then:
Status update: Things are coming along well. I'm adding a lot of abstraction layers to the original plugin. These layers should allow developers to make menus easier than ever.
Here's a sneak preview: Menus are made of MenuComponents, which can be buttons, labels, or other menus. MenuComponents, when clicked, will cause Actions to be triggered. Developers will then catch these actions to add functionality to the menus.
@NuclearSnowman
Code is changing drastically, so hold your questions, as I can't answer them
Is there a way I can make it so that the item I bind the menu to doesn't disappear after it is used?
I highly suggest making this future proof for long term usability. Other menu items have done so, should be strictly doable with just bukkit api.
@LordKainzo
source is changing drastically now that I've taken over. Give me a week or two to fix things up.