perf: 清理无效代码
This commit is contained in:
@@ -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>
|
||||
|
@@ -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(
|
||||
|
Reference in New Issue
Block a user