mirror of
https://github.com/CarmJos/MineSQL.git
synced 2026-06-05 00:48:16 +08:00
feat(lib): 独立数据库依赖加载,缩减文件体积。
This commit is contained in:
@@ -4,10 +4,11 @@ import cc.carm.lib.easyplugin.EasyPlugin;
|
||||
import cc.carm.plugin.minesql.conf.PluginConfiguration;
|
||||
import co.aikar.commands.CommandManager;
|
||||
import co.aikar.commands.PaperCommandManager;
|
||||
import net.byteflux.libby.BukkitLibraryManager;
|
||||
import net.byteflux.libby.LibraryManager;
|
||||
import org.bstats.bukkit.Metrics;
|
||||
import org.bstats.charts.SimplePie;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
@@ -15,6 +16,8 @@ public class MineSQLBukkit extends EasyPlugin implements MineSQLPlatform {
|
||||
|
||||
protected static MineSQLBukkit instance;
|
||||
|
||||
protected BukkitLibraryManager libraryManager;
|
||||
|
||||
protected MineSQLCore core;
|
||||
protected PaperCommandManager commandManager;
|
||||
|
||||
@@ -22,6 +25,9 @@ public class MineSQLBukkit extends EasyPlugin implements MineSQLPlatform {
|
||||
protected void load() {
|
||||
MineSQLBukkit.instance = this;
|
||||
|
||||
log("加载依赖管理器...");
|
||||
this.libraryManager = new BukkitLibraryManager(this);
|
||||
|
||||
log("加载基础核心...");
|
||||
this.core = new MineSQLCore(this);
|
||||
}
|
||||
@@ -75,10 +81,15 @@ public class MineSQLBukkit extends EasyPlugin implements MineSQLPlatform {
|
||||
return this.core.getConfig();
|
||||
}
|
||||
|
||||
public @Nullable CommandManager<?, ?, ?, ?, ?, ?> getCommandManager() {
|
||||
public @NotNull CommandManager<?, ?, ?, ?, ?, ?> getCommandManager() {
|
||||
return commandManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull LibraryManager getLibraryManager() {
|
||||
return this.libraryManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull File getPluginFolder() {
|
||||
return getDataFolder();
|
||||
|
||||
Reference in New Issue
Block a user