mirror of
https://github.com/CarmJos/MineSQL.git
synced 2026-06-04 16:43:03 +08:00
feat(lib): 独立数据库依赖加载,缩减文件体积。
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>minesql-parent</artifactId>
|
||||
<groupId>cc.carm.plugin</groupId>
|
||||
<version>1.3.1</version>
|
||||
<version>1.4.0</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
@@ -79,17 +79,24 @@
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>net.byteflux</groupId>
|
||||
<artifactId>libby-bukkit</artifactId>
|
||||
<version>${deps.libby.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.bstats</groupId>
|
||||
<artifactId>bstats-bukkit</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<version>${deps.bstats.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>co.aikar</groupId>
|
||||
<artifactId>acf-paper</artifactId>
|
||||
<version>0.5.1-SNAPSHOT</version>
|
||||
<version>${deps.acf.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -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