MGLib
Forenote
MGLib is currently deprecated and has been superseded by Flint, a much nicer and better thought-out engine. I do not recommend creating plugins using MGLib at this point in time; rather, please use Flint as it will save both you and your users many headaches.
What is MGLib?
MGLib is a library designed with ease-of-use in mind, and made to assist plugin developers in creating minigame plugins. Generally speaking, almost all minigame plugins have the same basic functionality built into them. However, this basic functionality (e.g. round management) takes a lot of time to create. If all the core code is effectively the same, why not just use the same exact code instead of rewriting it every time? This is where MGLib comes into play. MGLib provides an API for minigame plugins to use, so that they don't need to write it themselves. This can drastically reduce the size and time investment of individual plugins. MGLib boasts an easy-to-use and understand API, paired with a large featureset, with more functionality being planned and implemented every day.
Features
For Developers
- A central API instance to call most methods
- Easy round/player management via discrete object types (Round and MGPlayer)
- Plenty of redundancy! For example, you could use either of the aforementioned classes to add a player to a round
- Easy arena creation
- Simple but flexible player management
- Issues are passed onto your plugin via easy-to-understand exceptions so you can handle them yourself
- Automatic round timing system
- Automatic rollback system
- Automatic but configurable lobby sign system
- Discrete and easy-to-use class for configuration of your minigame's variables
- Maven support
- More to come!
For Server Owners
- Simple install, just drag and drop the JAR file
- All plugins using MGLib will automatically hook it if it's installed
- Silent auto-updater to ensure you're getting access to the latest plugins and features
Want to suggest a feature? Create an issue or create a pull request!
How to Use
Developers
Click here for a complete tutorial on using MGLib to create a minigame of your own!
Server Owners
Drag and drop! Once you install a plugin which uses MGLib, it will automatically hook in and you'll be good to go.
Planned Features
Changelogs
Plugins using MGLib
If you'd like your plugin listed here, shoot me a PM!
We also have a banner for plugins utilizing MGLib to use. Feel free to add it to your project page if you wish. (Alternative banner)
Donations
I've spent hundreds of hours developing MGLib. I do it for free because it's my passion, but I greatly appreciate donations if you can offer them. :)
Click the Donate button at the top right of the page to say thanks!
External Links
Development builds of this project can be acquired at the provided continuous integration server. These builds have not been approved by the BukkitDev staff. Use them at your own risk. Additionally, these builds often undergo little to no testing, so there is no guarantee they will function properly.
MCStats
This plugin collects anonymous usage statistics. Here's a list detailing data collected, and here's a graph of and link to them:
Sponsor
Special thanks to HostHorde for supporting MGLib! Make sure to check them out!
Note: This plugin utilizes Mojang's UUID API to enable certain features.
Please refrain from reporting bugs in the comments. Instead, create an issue. :)
@IBeRamen
I was trying to convert the project to Maven, so I didn't want the normally-configured project building once the Maven structure was implemented. I'll reenable it and finish converting it once I get home later tonight though. :D
Why is the project disabled in Jenkins? @MaximRoncace
Nice plugin!
@erez9901
Glad you like it! :D
@caseif
Thanks for this awesome plugin! save tons of times!
@Bars96
Probably, but no promises.
Is it works on CB 1.5.2?
@IBeRamen
Yeah, this was a rather silly bug in MGLib v0.1.0. It's since been fixed in recent dev builds.
@caseif
I get this error for the spleef plugin as well when attempting to create an arena. (I know it's not public yet, just thought I would share it)
https://gist.github.com/IBeRamen/f481581186356d256ea3
@snake302
This is a bug which has been patched in the latest dev build. It will be fixed in 0.1.1.
Edit: It actually had two separate causes, only one of which was fixed by 0.1.1-dev2. I've fixed the other in 0.1.1-dev3.
May be bug - I set cm.setPvPAllowed(true); cm.setDamageAllowed(true);
and in worldguard pvp - true
When I joined arena I can't pvp with players - no damage....
If I am not in arena - I can pvp
@caseif
Thank's :D
@snake302
@coco5843
The plugin made to demonstrate MGLib is neither finished nor public yet. Therefore, bugs are to be expected. But, thank you for bringing it to my attention. I'll fix it soon.
@snake302
Me too
I tried to use /spleef spawn add [arena name] and have error, but all works))
Can you make plugin example ? to use all the features of your API
I do not understand exactly how to create the arena from the start
Ah excuse me , I found : https://bitbucket.org/mproncace/spleef-mglib/src/55fced4bb520a62f6e7f4a237148512f9ddbfc82/Spleef/?at=master
@Wizardo367
@lolwhycant
@DanSpedey
@Polishgaming
I've just uploaded the first alpha build to DBO. It should be available for download within 24-72 hours.
@Polishgaming
If by "passes" you mean "is completed," then I'm glad to inform you that it's nearly finished. Well, not finished per sé, but it's almost ready for an alpha release. I'll be adding more features further down the line, but I've got most of the core stuff done. Anyway, I'll hopefully upload it tomorrow, and it should become available sometime between Saturday and Monday.
I see this as a very useful plugin for me. I just hope it passes and I can use it to create minigames. Polish
<<reply 2130579="">>
Got held up with one of my other plugins because of that whole UUID system Mojang implemented. I'll see if I can get some testing done today, though. Spring break just started, so I should have considerably more time than usual, but admittedly, I've been slacking a bit. I'll try to pick up the pace.