[WIP] Start breakout of mcmmo plugin

This commit starts work on the seperation of mcmmo and platform logic,
there is still a fair amount of work to go before this will compile,
down the line (potentially much further), bukkit logic will be stripped
out of -core
This commit is contained in:
Shane Freeder
2019-10-09 21:53:04 +01:00
parent 1fbcf698c6
commit eee09d8d76
7 changed files with 104 additions and 11 deletions

View File

@ -0,0 +1,28 @@
package com.gmail.nossr50.mcmmo.bukkit;
import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.mcmmo.api.platform.PlatformProvider;
import org.bukkit.event.HandlerList;
import org.bukkit.plugin.java.JavaPlugin;
import org.jetbrains.annotations.NotNull;
import java.util.logging.Logger;
public class BukkitBoostrap extends JavaPlugin implements PlatformProvider {
private mcMMO core = new mcMMO(this);
@Override
public @NotNull Logger getLogger() {
return super.getLogger();
}
@Override
public void tearDown() {
core.debug("Canceling all tasks...");
getServer().getScheduler().cancelTasks(this); // This removes our tasks
core.debug("Unregister all events...");
HandlerList.unregisterAll(this); // Cancel event registrations
}
}