style: 代码结构优化
This commit is contained in:
@@ -26,13 +26,15 @@ dependencies {
|
||||
// https://mvnrepository.com/artifact/net.kyori/adventure-platform-bukkit
|
||||
api 'net.kyori:adventure-platform-bukkit:4.1.2'
|
||||
oldJar 'net.kyori:adventure-platform-bukkit:4.1.2'
|
||||
// https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp
|
||||
api 'com.squareup.okhttp3:okhttp:4.10.0'
|
||||
oldJar 'com.squareup.okhttp3:okhttp:4.10.0'
|
||||
|
||||
// // https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp
|
||||
// api 'com.squareup.okhttp3:okhttp:4.10.0'
|
||||
// oldJar 'com.squareup.okhttp3:okhttp:4.10.0'
|
||||
|
||||
// https://mvnrepository.com/artifact/com.zaxxer/HikariCP
|
||||
compileOnly 'com.zaxxer:HikariCP:5.0.1'
|
||||
//noinspection GradlePackageUpdate
|
||||
oldJar 'com.zaxxer:HikariCP:4.0.3'
|
||||
oldJar('com.zaxxer:HikariCP:4.0.3') exclude group: "org.slf4j"
|
||||
}
|
||||
|
||||
processResources {
|
||||
|
@@ -12,7 +12,7 @@ import cn.hamster3.mc.plugin.core.bukkit.page.listener.PageListener;
|
||||
import cn.hamster3.mc.plugin.core.bukkit.util.ItemStackAdapter;
|
||||
import cn.hamster3.mc.plugin.core.common.constant.CoreConstantObjects;
|
||||
import cn.hamster3.mc.plugin.core.common.data.DisplayMessage;
|
||||
import cn.hamster3.mc.plugin.core.common.util.MessageTypeAdapter;
|
||||
import cn.hamster3.mc.plugin.core.common.misc.MessageTypeAdapter;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import net.kyori.adventure.platform.bukkit.BukkitAudiences;
|
||||
import org.bukkit.Bukkit;
|
||||
|
@@ -44,10 +44,11 @@ public abstract class ParentCommand extends ChildCommand {
|
||||
@NotNull
|
||||
@Override
|
||||
public String getUsage() {
|
||||
if (getParent() == null) {
|
||||
ParentCommand parent = getParent();
|
||||
if (parent == null) {
|
||||
return "/" + name;
|
||||
}
|
||||
return getParent().getUsage() + " " + name;
|
||||
return parent.getUsage() + " " + name;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -3,7 +3,7 @@ package cn.hamster3.mc.plugin.core.bukkit.command.lore;
|
||||
import cn.hamster3.mc.plugin.core.bukkit.HamsterCorePlugin;
|
||||
import cn.hamster3.mc.plugin.core.bukkit.command.ParentCommand;
|
||||
import cn.hamster3.mc.plugin.core.bukkit.command.lore.sub.*;
|
||||
import cn.hamster3.mc.plugin.core.common.util.CommonUtils;
|
||||
import cn.hamster3.mc.plugin.core.common.util.CoreUtils;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
@@ -30,7 +30,7 @@ public final class ParentLoreCommand extends ParentCommand {
|
||||
|
||||
@Override
|
||||
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, String[] args) {
|
||||
CommonUtils.replaceColorCode(args);
|
||||
CoreUtils.replaceColorCode(args);
|
||||
return super.onCommand(sender, command, label, args);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user