build: 优化依赖
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package cn.hamster3.mc.plugin.core.common.api;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import lombok.Getter;
|
||||
import net.kyori.adventure.platform.AudienceProvider;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@@ -12,12 +13,9 @@ import java.util.concurrent.ScheduledExecutorService;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public abstract class CoreAPI {
|
||||
@Getter
|
||||
protected static CoreAPI instance;
|
||||
|
||||
public static CoreAPI getInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public abstract AudienceProvider getAudienceProvider();
|
||||
|
||||
@@ -32,20 +30,24 @@ public abstract class CoreAPI {
|
||||
/**
|
||||
* @return GSON 工具
|
||||
*/
|
||||
@NotNull
|
||||
public abstract Gson getGson();
|
||||
|
||||
/**
|
||||
* @return GSON 工具,会使用格式化输出、且解析中包含null参数
|
||||
*/
|
||||
@NotNull
|
||||
public abstract Gson getHumanGson();
|
||||
|
||||
/**
|
||||
* @return 异步线程池
|
||||
*/
|
||||
@NotNull
|
||||
public abstract ExecutorService getExecutorService();
|
||||
|
||||
/**
|
||||
* @return 调度器线程池
|
||||
*/
|
||||
@NotNull
|
||||
public abstract ScheduledExecutorService getScheduledExecutorService();
|
||||
}
|
||||
|
Reference in New Issue
Block a user