perf: 优化代码
This commit is contained in:
@@ -11,11 +11,11 @@ import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class CoreBukkitAPI extends CoreAPI {
|
||||
public final class CoreBukkitAPI extends CoreAPI {
|
||||
private final BukkitAudiences audienceProvider;
|
||||
private final HikariDataSource datasource;
|
||||
|
||||
public CoreBukkitAPI() {
|
||||
private CoreBukkitAPI() {
|
||||
HamsterCorePlugin plugin = HamsterCorePlugin.getInstance();
|
||||
audienceProvider = BukkitAudiences.create(plugin);
|
||||
|
||||
@@ -40,6 +40,9 @@ public class CoreBukkitAPI extends CoreAPI {
|
||||
}
|
||||
|
||||
public static void init() {
|
||||
if (instance != null) {
|
||||
return;
|
||||
}
|
||||
instance = new CoreBukkitAPI();
|
||||
}
|
||||
|
||||
|
@@ -8,7 +8,7 @@ import org.bukkit.command.CommandSender;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class ParentLoreCommand extends ParentCommand {
|
||||
public final class ParentLoreCommand extends ParentCommand {
|
||||
public static final ParentLoreCommand INSTANCE = new ParentLoreCommand("lore", HamsterCorePlugin.COMMAND_EXECUTOR);
|
||||
|
||||
private ParentLoreCommand(@NotNull String name, @Nullable ParentCommand parent) {
|
||||
|
Reference in New Issue
Block a user