perf: 清理无效代码

This commit is contained in:
2024-03-13 20:51:48 +08:00
parent de7c4decf1
commit ac18e73c5e
8 changed files with 16 additions and 115 deletions

View File

@@ -3,21 +3,13 @@
evaluationDependsOn(":core-common")
dependencies {
implementation(project(":core-common")) {
isTransitive = false
}
implementation(project(":core-common")) { isTransitive = false }
compileOnly("org.spigotmc:spigot-api:1.18.2-R0.1-SNAPSHOT")
implementation("de.tr7zw:item-nbt-api:2.12.3-SNAPSHOT")
compileOnly("net.milkbowl.vault:VaultAPI:1.7") {
isTransitive = false
}
compileOnly("org.black_ixx:playerpoints:3.2.6") {
isTransitive = false
}
compileOnly("me.clip:placeholderapi:2.11.5") {
isTransitive = false
}
compileOnly("net.milkbowl.vault:VaultAPI:1.7") { isTransitive = false }
compileOnly("org.black_ixx:playerpoints:3.2.6") { isTransitive = false }
compileOnly("me.clip:placeholderapi:2.11.5") { isTransitive = false }
implementation("net.kyori:adventure-platform-bukkit:4.3.2") {
exclude(group = "org.jetbrains")
@@ -27,18 +19,14 @@ dependencies {
exclude(module = "adventure-api")
exclude(group = "org.jetbrains")
}
implementation("com.zaxxer:HikariCP:4.0.3") {
exclude(group = "org.slf4j")
}
implementation("com.zaxxer:HikariCP:4.0.3") { exclude(group = "org.slf4j") }
// https://mvnrepository.com/artifact/redis.clients/jedis
implementation("redis.clients:jedis:5.1.2") {
exclude(group = "com.google.code.gson")
exclude(group = "org.slf4j")
}
// https://mvnrepository.com/artifact/org.quartz-scheduler/quartz
implementation("org.quartz-scheduler:quartz:2.3.2") {
isTransitive = false
}
implementation("org.quartz-scheduler:quartz:2.3.2") { isTransitive = false }
}
tasks {

View File

@@ -13,19 +13,10 @@ import java.util.stream.Collectors;
@SuppressWarnings("unused")
public abstract class ParentCommand extends ChildCommand {
@NotNull
private final String name;
@NotNull
private final List<ChildCommand> childCommands;
public ParentCommand() {
name = "unset";
childCommands = new ArrayList<>();
}
@Deprecated
public ParentCommand(@NotNull String name) {
this.name = name;
childCommands = new ArrayList<>();
}
@@ -34,9 +25,7 @@ public abstract class ParentCommand extends ChildCommand {
@NotNull
@Override
public String getName() {
return name;
}
public abstract String getName();
@Nullable
public ParentCommand getParent() {
@@ -79,14 +68,6 @@ public abstract class ParentCommand extends ChildCommand {
plugin.getLogger().info("已注册指令 " + getUsage());
}
/**
* 建议使用 {@link #register()}
*/
@Deprecated
public void hook() {
register();
}
/**
* 获取所有子命令
* <p>

View File

@@ -367,7 +367,6 @@ public final class CoreBukkitUtils {
}
@NotNull
@SuppressWarnings("deprecation")
public static JsonObject serializePotionEffect(@NotNull PotionEffect effect) {
JsonObject object = new JsonObject();
object.addProperty("type", effect.getType().getName());
@@ -377,7 +376,6 @@ public final class CoreBukkitUtils {
}
@NotNull
@SuppressWarnings("deprecation")
public static PotionEffect deserializePotionEffect(@NotNull JsonObject object) {
//noinspection ConstantConditions
return new PotionEffect(