mirror of
https://github.com/CarmJos/MineSQL.git
synced 2026-06-05 00:48:16 +08:00
feat(lib): 独立数据库依赖加载,缩减文件体积。
This commit is contained in:
@@ -5,12 +5,13 @@ import cc.carm.lib.easyplugin.utils.JarResourceUtils;
|
||||
import cc.carm.plugin.minesql.conf.PluginConfiguration;
|
||||
import co.aikar.commands.BungeeCommandManager;
|
||||
import co.aikar.commands.CommandManager;
|
||||
import net.byteflux.libby.BungeeLibraryManager;
|
||||
import net.byteflux.libby.LibraryManager;
|
||||
import net.md_5.bungee.api.ProxyServer;
|
||||
import net.md_5.bungee.api.plugin.Plugin;
|
||||
import org.bstats.bungeecord.Metrics;
|
||||
import org.bstats.charts.SimplePie;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Arrays;
|
||||
@@ -21,6 +22,8 @@ public class MineSQLBungee extends Plugin implements MineSQLPlatform {
|
||||
|
||||
protected static MineSQLBungee instance;
|
||||
|
||||
protected BungeeLibraryManager libraryManager;
|
||||
|
||||
protected MineSQLCore core;
|
||||
protected BungeeCommandManager commandManager;
|
||||
|
||||
@@ -28,6 +31,9 @@ public class MineSQLBungee extends Plugin implements MineSQLPlatform {
|
||||
public void onLoad() {
|
||||
MineSQLBungee.instance = this;
|
||||
|
||||
getLogger().info("加载依赖管理器...");
|
||||
this.libraryManager = new BungeeLibraryManager(this);
|
||||
|
||||
getLogger().info("加载基础核心...");
|
||||
this.core = new MineSQLCore(this);
|
||||
}
|
||||
@@ -89,10 +95,15 @@ public class MineSQLBungee extends Plugin implements MineSQLPlatform {
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable CommandManager<?, ?, ?, ?, ?, ?> getCommandManager() {
|
||||
public @NotNull CommandManager<?, ?, ?, ?, ?, ?> getCommandManager() {
|
||||
return this.commandManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull LibraryManager getLibraryManager() {
|
||||
return this.libraryManager;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void outputInfo() {
|
||||
Optional.ofNullable(JarResourceUtils.readResource(this.getResourceAsStream("PLUGIN_INFO")))
|
||||
|
||||
Reference in New Issue
Block a user