This commit is contained in:
坏黑 2018-12-25 20:50:48 +08:00
parent 738bb7820a
commit 98dc366a03
4 changed files with 51 additions and 9 deletions

View File

@ -44,6 +44,11 @@ public class TabooLibMainCommand extends BaseMainCommand {
@CommandRegister(priority = 1) @CommandRegister(priority = 1)
BaseSubCommand save = new BaseSubCommand() { BaseSubCommand save = new BaseSubCommand() {
@Override
public boolean hideInHelp() {
return true;
}
@Override @Override
public String getLabel() { public String getLabel() {
return "save"; return "save";
@ -73,6 +78,11 @@ public class TabooLibMainCommand extends BaseMainCommand {
@CommandRegister(priority = 2) @CommandRegister(priority = 2)
BaseSubCommand item = new BaseSubCommand() { BaseSubCommand item = new BaseSubCommand() {
@Override
public boolean hideInHelp() {
return true;
}
@Override @Override
public String getLabel() { public String getLabel() {
return "item"; return "item";
@ -113,7 +123,7 @@ public class TabooLibMainCommand extends BaseMainCommand {
@Override @Override
public String getDescription() { public String getDescription() {
return TLocale.asString("COMMANDS.TABOOLIB.ITEMLIST.DESCRIPTION"); return TLocale.asString("COMMANDS.TABOOLIB.INFO.DESCRIPTION");
} }
@Override @Override
@ -130,6 +140,11 @@ public class TabooLibMainCommand extends BaseMainCommand {
@CommandRegister(priority = 3.1) @CommandRegister(priority = 3.1)
BaseSubCommand infoList = new BaseSubCommand() { BaseSubCommand infoList = new BaseSubCommand() {
@Override
public boolean hideInHelp() {
return true;
}
@Override @Override
public String getLabel() { public String getLabel() {
return "itemList"; return "itemList";
@ -159,6 +174,11 @@ public class TabooLibMainCommand extends BaseMainCommand {
@CommandRegister(priority = 4) @CommandRegister(priority = 4)
BaseSubCommand itemReload = new BaseSubCommand() { BaseSubCommand itemReload = new BaseSubCommand() {
@Override
public boolean hideInHelp() {
return true;
}
@Override @Override
public String getLabel() { public String getLabel() {
return "itemReload"; return "itemReload";
@ -610,12 +630,14 @@ public class TabooLibMainCommand extends BaseMainCommand {
} }
}; };
@CommandRegister(priority = 17)
BaseSubCommand getEmptyLine4 = null;
@CommandRegister(priority = 20) @CommandRegister(priority = 20)
BaseSubCommand tagDisplay = new BaseSubCommand() { BaseSubCommand tagDisplay = new BaseSubCommand() {
@Override
public boolean hideInHelp() {
return true;
}
@Override @Override
public String getLabel() { public String getLabel() {
return "tagDisplay"; return "tagDisplay";
@ -648,6 +670,11 @@ public class TabooLibMainCommand extends BaseMainCommand {
@CommandRegister(priority = 21) @CommandRegister(priority = 21)
BaseSubCommand tagPrefix = new BaseSubCommand() { BaseSubCommand tagPrefix = new BaseSubCommand() {
@Override
public boolean hideInHelp() {
return true;
}
@Override @Override
public String getLabel() { public String getLabel() {
return "tagPrefix"; return "tagPrefix";
@ -680,6 +707,11 @@ public class TabooLibMainCommand extends BaseMainCommand {
@CommandRegister(priority = 22) @CommandRegister(priority = 22)
BaseSubCommand tagSuffix = new BaseSubCommand() { BaseSubCommand tagSuffix = new BaseSubCommand() {
@Override
public boolean hideInHelp() {
return true;
}
@Override @Override
public String getLabel() { public String getLabel() {
return "tagSuffix"; return "tagSuffix";
@ -712,6 +744,11 @@ public class TabooLibMainCommand extends BaseMainCommand {
@CommandRegister(priority = 23) @CommandRegister(priority = 23)
BaseSubCommand tagDelete = new BaseSubCommand() { BaseSubCommand tagDelete = new BaseSubCommand() {
@Override
public boolean hideInHelp() {
return true;
}
@Override @Override
public String getLabel() { public String getLabel() {
return "tagDelete"; return "tagDelete";
@ -780,12 +817,14 @@ public class TabooLibMainCommand extends BaseMainCommand {
} }
}; };
@CommandRegister(priority = 26)
BaseSubCommand getEmptyLine7 = null;
@CommandRegister(priority = 27) @CommandRegister(priority = 27)
BaseSubCommand importData = new BaseSubCommand() { BaseSubCommand importData = new BaseSubCommand() {
@Override
public boolean hideInHelp() {
return true;
}
@Override @Override
public String getLabel() { public String getLabel() {
return "importData"; return "importData";

View File

@ -109,7 +109,7 @@ public abstract class BaseMainCommand implements CommandExecutor, TabExecutor {
@Override @Override
public List<String> onTabComplete(CommandSender commandSender, Command command, String s, String[] args) { public List<String> 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 @Override

View File

@ -87,7 +87,9 @@ public class ListenerSoundsCommand implements Listener {
openInventory((Player) e.getWhoClicked(), soundLibraryHolder.PAGE + 1, soundLibraryHolder.SEARCH); openInventory((Player) e.getWhoClicked(), soundLibraryHolder.PAGE + 1, soundLibraryHolder.SEARCH);
} else { } else {
Sound sound = soundLibraryHolder.SOUNDS_DATA.get(e.getRawSlot()); 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); ((Player) e.getWhoClicked()).playSound(e.getWhoClicked().getLocation(), sound, 1f, 1f);
} else if (e.getClick().isRightClick()) { } else if (e.getClick().isRightClick()) {
((Player) e.getWhoClicked()).playSound(e.getWhoClicked().getLocation(), sound, 1f, 2f); ((Player) e.getWhoClicked()).playSound(e.getWhoClicked().getLocation(), sound, 1f, 2f);

View File

@ -318,6 +318,7 @@ COMMANDS:
BACK: '&f下一页' BACK: '&f下一页'
LORE: LORE:
- '' - ''
- '&fQ键: &70 音调'
- '&f左键: &71 音调' - '&f左键: &71 音调'
- '&f右键: &72 音调' - '&f右键: &72 音调'
- '&f中键: &7复制名称' - '&f中键: &7复制名称'