perf: 优化代码
This commit is contained in:
@@ -7,7 +7,7 @@ dependencies {
|
||||
exclude group: "*"
|
||||
}
|
||||
//noinspection GradlePackageUpdate
|
||||
compileOnly('net.md-5:bungeecord-api:1.17-R0.1-SNAPSHOT')
|
||||
compileOnly 'net.md-5:bungeecord-api:1.17-R0.1-SNAPSHOT'
|
||||
// https://mvnrepository.com/artifact/net.kyori/adventure-platform-bungeecord
|
||||
apiShade 'net.kyori:adventure-platform-bungeecord:4.1.2'
|
||||
|
||||
|
@@ -11,11 +11,11 @@ import net.md_5.bungee.config.Configuration;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class CoreBungeeAPI extends CoreAPI {
|
||||
public final class CoreBungeeAPI extends CoreAPI {
|
||||
private final BungeeAudiences audienceProvider;
|
||||
private final HikariDataSource datasource;
|
||||
|
||||
public CoreBungeeAPI() {
|
||||
private CoreBungeeAPI() {
|
||||
HamsterCorePlugin plugin = HamsterCorePlugin.getInstance();
|
||||
audienceProvider = BungeeAudiences.create(plugin);
|
||||
|
||||
@@ -39,6 +39,9 @@ public class CoreBungeeAPI extends CoreAPI {
|
||||
}
|
||||
|
||||
public static void init() {
|
||||
if (instance != null) {
|
||||
return;
|
||||
}
|
||||
instance = new CoreBungeeAPI();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user