transition to paper plugin
All checks were successful
Build / build (push) Successful in 3m22s

This commit is contained in:
unurled 2024-07-03 18:44:00 +02:00
parent ce0ffdbdfc
commit 7816bbe384
19 changed files with 417 additions and 525 deletions

View file

@ -0,0 +1,34 @@
package me.unurled.sacredrealms.sr;
import io.papermc.paper.plugin.bootstrap.BootstrapContext;
import io.papermc.paper.plugin.bootstrap.PluginBootstrap;
import io.papermc.paper.plugin.bootstrap.PluginProviderContext;
import me.unurled.sacredrealms.sr.commands.CommandManager;
import org.bukkit.plugin.java.JavaPlugin;
import org.jetbrains.annotations.NotNull;
public class SRBootstrap implements PluginBootstrap {
/**
* Called by the server, allowing you to bootstrap the plugin with a context that provides things
* like a logger and your shared plugin configuration file.
*
* @param context the server provided context
*/
@Override
public void bootstrap(@NotNull BootstrapContext context) {
CommandManager.loadCommands(context);
}
/**
* Called by the server to instantiate your main class. Plugins may override this logic to define
* custom creation logic for said instance, like passing addition constructor arguments.
*
* @param context the server created bootstrap object
* @return the server requested instance of the plugins main class.
*/
@Override
public @NotNull JavaPlugin createPlugin(@NotNull PluginProviderContext context) {
return PluginBootstrap.super.createPlugin(context);
}
}