diff --git a/src/main/java/me/skymc/taboolib/commands/TabooLibMainCommand.java b/src/main/java/me/skymc/taboolib/commands/TabooLibMainCommand.java index 767ae66..6582ea4 100644 --- a/src/main/java/me/skymc/taboolib/commands/TabooLibMainCommand.java +++ b/src/main/java/me/skymc/taboolib/commands/TabooLibMainCommand.java @@ -44,6 +44,11 @@ public class TabooLibMainCommand extends BaseMainCommand { @CommandRegister(priority = 1) BaseSubCommand save = new BaseSubCommand() { + @Override + public boolean hideInHelp() { + return true; + } + @Override public String getLabel() { return "save"; @@ -73,6 +78,11 @@ public class TabooLibMainCommand extends BaseMainCommand { @CommandRegister(priority = 2) BaseSubCommand item = new BaseSubCommand() { + @Override + public boolean hideInHelp() { + return true; + } + @Override public String getLabel() { return "item"; @@ -113,7 +123,7 @@ public class TabooLibMainCommand extends BaseMainCommand { @Override public String getDescription() { - return TLocale.asString("COMMANDS.TABOOLIB.ITEMLIST.DESCRIPTION"); + return TLocale.asString("COMMANDS.TABOOLIB.INFO.DESCRIPTION"); } @Override @@ -130,6 +140,11 @@ public class TabooLibMainCommand extends BaseMainCommand { @CommandRegister(priority = 3.1) BaseSubCommand infoList = new BaseSubCommand() { + @Override + public boolean hideInHelp() { + return true; + } + @Override public String getLabel() { return "itemList"; @@ -159,6 +174,11 @@ public class TabooLibMainCommand extends BaseMainCommand { @CommandRegister(priority = 4) BaseSubCommand itemReload = new BaseSubCommand() { + @Override + public boolean hideInHelp() { + return true; + } + @Override public String getLabel() { return "itemReload"; @@ -610,12 +630,14 @@ public class TabooLibMainCommand extends BaseMainCommand { } }; - @CommandRegister(priority = 17) - BaseSubCommand getEmptyLine4 = null; - @CommandRegister(priority = 20) BaseSubCommand tagDisplay = new BaseSubCommand() { + @Override + public boolean hideInHelp() { + return true; + } + @Override public String getLabel() { return "tagDisplay"; @@ -648,6 +670,11 @@ public class TabooLibMainCommand extends BaseMainCommand { @CommandRegister(priority = 21) BaseSubCommand tagPrefix = new BaseSubCommand() { + @Override + public boolean hideInHelp() { + return true; + } + @Override public String getLabel() { return "tagPrefix"; @@ -680,6 +707,11 @@ public class TabooLibMainCommand extends BaseMainCommand { @CommandRegister(priority = 22) BaseSubCommand tagSuffix = new BaseSubCommand() { + @Override + public boolean hideInHelp() { + return true; + } + @Override public String getLabel() { return "tagSuffix"; @@ -712,6 +744,11 @@ public class TabooLibMainCommand extends BaseMainCommand { @CommandRegister(priority = 23) BaseSubCommand tagDelete = new BaseSubCommand() { + @Override + public boolean hideInHelp() { + return true; + } + @Override public String getLabel() { return "tagDelete"; @@ -780,12 +817,14 @@ public class TabooLibMainCommand extends BaseMainCommand { } }; - @CommandRegister(priority = 26) - BaseSubCommand getEmptyLine7 = null; - @CommandRegister(priority = 27) BaseSubCommand importData = new BaseSubCommand() { + @Override + public boolean hideInHelp() { + return true; + } + @Override public String getLabel() { return "importData"; diff --git a/src/main/java/me/skymc/taboolib/commands/internal/BaseMainCommand.java b/src/main/java/me/skymc/taboolib/commands/internal/BaseMainCommand.java index 589b333..32cd2d8 100644 --- a/src/main/java/me/skymc/taboolib/commands/internal/BaseMainCommand.java +++ b/src/main/java/me/skymc/taboolib/commands/internal/BaseMainCommand.java @@ -109,7 +109,7 @@ public abstract class BaseMainCommand implements CommandExecutor, TabExecutor { @Override public List onTabComplete(CommandSender commandSender, Command command, String s, String[] args) { - return args.length == 1 ? subCommands.stream().filter(subCommand -> subCommand != null && hasPermission(commandSender, subCommand) && (args[0].isEmpty() || subCommand.getLabel().toLowerCase().startsWith(args[0].toLowerCase()))).map(BaseSubCommand::getLabel).collect(Collectors.toList()) : null; + return args.length == 1 ? subCommands.stream().filter(subCommand -> !hideInHelp(subCommand) && hasPermission(commandSender, subCommand) && (args[0].isEmpty() || subCommand.getLabel().toLowerCase().startsWith(args[0].toLowerCase()))).map(BaseSubCommand::getLabel).collect(Collectors.toList()) : null; } @Override diff --git a/src/main/java/me/skymc/taboolib/commands/taboolib/listener/ListenerSoundsCommand.java b/src/main/java/me/skymc/taboolib/commands/taboolib/listener/ListenerSoundsCommand.java index d55d6b4..3c42a88 100644 --- a/src/main/java/me/skymc/taboolib/commands/taboolib/listener/ListenerSoundsCommand.java +++ b/src/main/java/me/skymc/taboolib/commands/taboolib/listener/ListenerSoundsCommand.java @@ -87,7 +87,9 @@ public class ListenerSoundsCommand implements Listener { openInventory((Player) e.getWhoClicked(), soundLibraryHolder.PAGE + 1, soundLibraryHolder.SEARCH); } else { Sound sound = soundLibraryHolder.SOUNDS_DATA.get(e.getRawSlot()); - if (e.getClick().isLeftClick()) { + if (e.getClick().isKeyboardClick()) { + ((Player) e.getWhoClicked()).playSound(e.getWhoClicked().getLocation(), sound, 1f, 0f); + } else if (e.getClick().isLeftClick()) { ((Player) e.getWhoClicked()).playSound(e.getWhoClicked().getLocation(), sound, 1f, 1f); } else if (e.getClick().isRightClick()) { ((Player) e.getWhoClicked()).playSound(e.getWhoClicked().getLocation(), sound, 1f, 2f); diff --git a/src/main/resources/lang/zh_CN.yml b/src/main/resources/lang/zh_CN.yml index 80915b3..9b5fc14 100644 --- a/src/main/resources/lang/zh_CN.yml +++ b/src/main/resources/lang/zh_CN.yml @@ -318,6 +318,7 @@ COMMANDS: BACK: '&f下一页' LORE: - '' + - '&fQ键: &70 音调' - '&f左键: &71 音调' - '&f右键: &72 音调' - '&f中键: &7复制名称'