ModsJava
GuicyBukkit
Java mod listed for Minecraft 1.7–1.15. Download on the author's site.
⬇ Download on SpigotDependency injection is great. Using it with Spigot is even better, right?
Guice is a pretty good framework to use it with, but it was pretty boilerplate-y to use it with Spigot . Not to mention the hassle of putting listeners and commands.
And that's where GuicyBukkit comes in!
Features
- Register listeners
- Register commands
- Remove your pesky static singletons
Showcase
Code (Java):
public
class MyNicePluginModule
extends PluginModule
{
// We need a MyNicePlugin instance to create this module, and inject it.
public MyNicePluginModule ( MyNicePlugin plugin ) {
super ( plugin ) ;
}
@Override
protected void configureBindings ( ) {
bind ( SomeService. class ) . to ( SomeServiceImpl. class ) ;
}
@Override
protected void configureListeners ( Multibinder < Listener > binder ) {
binder. addBinding ( ) . to ( UsefulListener. class ) ;
}
@Override
protected void configureCommands ( Multibinder < CommandConfigurator > binder ) {
binder. addBinding ( ) . to ( HelloCommand. class ) ;
}
}
// We need a MyNicePlugin instance to create this module, and inject it.
public MyNicePluginModule ( MyNicePlugin plugin ) {
super ( plugin ) ;
}
@Override
protected void configureBindings ( ) {
bind ( SomeService. class ) . to ( SomeServiceImpl. class ) ;
}
@Override
protected void configureListeners ( Multibinder < Listener > binder ) {
binder. addBinding ( ) . to ( UsefulListener. class ) ;
}
@Override
protected void configureCommands ( Multibinder < CommandConfigurator > binder ) {
binder. addBinding ( ) . to ( HelloCommand. class ) ;
}
}
Code (Java):
public
class MyNicePlugin
extends JavaPlugin
{
@Override
public void onLoad ( ) {
Injector injector = Guice. createInjector ( new MyNicePluginModule ( this ) ) ;
PluginDependencies. fromInjector ( injector ) . registerAll ( this ) ;
}
}
@Override
public void onLoad ( ) {
Injector injector = Guice. createInjector ( new MyNicePluginModule ( this ) ) ;
PluginDependencies. fromInjector ( injector ) . registerAll ( this ) ;
}
}
Aditionnal resources
- MockBukkit is a pretty good library to mock a Bukkit server to test your plugin. In fact it's the only one I've found.
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft versions listed: 1.7, 1.8, 1.9
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Spigot — not every file is mirrored on our own servers.
Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.
GuicyBukkit is a free Minecraft Java mod. Compatible with Minecraft 1.7, 1.8, 1.9, 1.10 and newer. Downloaded 142 times (via Spigot). Download it and open it directly in the game.