This commit is contained in:
parent
ce0ffdbdfc
commit
7816bbe384
19 changed files with 417 additions and 525 deletions
34
src/main/java/me/unurled/sacredrealms/sr/SRBootstrap.java
Normal file
34
src/main/java/me/unurled/sacredrealms/sr/SRBootstrap.java
Normal 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);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue