ModsJava
Spring Boot Starter Spigot
Java mod listed for Minecraft 1.10–1.13. Download on the author's site.
⬇ Download on SpigotFeatures
Add the Spring boot starter to your project
<dependency>
<groupId>dev.alangomes</groupId>
<artifactId>spring-boot-starter-spigot</artifactId>
<version>0.9.0</version>
</dependency>
Create a class to configure the Spring boot application
@SpringBootApplication(scanBasePackages = "me.test.testplugin")
public class Application {
}
Then create the plugin main class using the standard spring initialization, just adding the SpringSpigotInitializer initializer.
public class ExamplePlugin extends JavaPlugin {
private ConfigurableApplicationContext context;
@Override
@SneakyThrows
public void onEnable() {
saveDefaultConfig();
ResourceLoader loader = new DefaultResourceLoader(getClassLoader());
SpringApplication application = new SpringApplication(loader, Application.class);
application.addInitializers(new SpringSpigotInitializer(this));
context = application.run();
}
@Override
public void onDisable() {
context.close();
context = null;
}
}
And that's it! Your plugin is ready to use all features from Picocli and Spring Boot!
Read more at the project documentation
- Easy setup
- Full Picocli @ Command support (thanks to picocli-spring-boot-starter)
- Secure calls with @Authorize
- Automatic Listener registration
- Full Spring's dependency injection support
- Easier Bukkit main thread synchronization via @Synchronize
Add the Spring boot starter to your project
Code (Text):
<dependency>
<groupId>dev.alangomes</groupId>
<artifactId>spring-boot-starter-spigot</artifactId>
<version>0.9.0</version>
</dependency>
Code (Text):
@SpringBootApplication(scanBasePackages = "me.test.testplugin")
public class Application {
}
Code (Text):
public class ExamplePlugin extends JavaPlugin {
private ConfigurableApplicationContext context;
@Override
@SneakyThrows
public void onEnable() {
saveDefaultConfig();
ResourceLoader loader = new DefaultResourceLoader(getClassLoader());
SpringApplication application = new SpringApplication(loader, Application.class);
application.addInitializers(new SpringSpigotInitializer(this));
context = application.run();
}
@Override
public void onDisable() {
context.close();
context = null;
}
}
Read more at the project documentation
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft versions listed: 1.10, 1.11, 1.12
- 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.
Spring Boot Starter Spigot is a free Minecraft Java mod. Compatible with Minecraft 1.10, 1.11, 1.12, 1.13. Downloaded 467 times (via Spigot). Download it and open it directly in the game.