+ 简化
This commit is contained in:
parent
738bb7820a
commit
98dc366a03
@ -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";
|
||||
|
@ -109,7 +109,7 @@ public abstract class BaseMainCommand implements CommandExecutor, TabExecutor {
|
||||
|
||||
@Override
|
||||
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
|
||||
|
@ -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);
|
||||
|
@ -318,6 +318,7 @@ COMMANDS:
|
||||
BACK: '&f下一页'
|
||||
LORE:
|
||||
- ''
|
||||
- '&fQ键: &70 音调'
|
||||
- '&f左键: &71 音调'
|
||||
- '&f右键: &72 音调'
|
||||
- '&f中键: &7复制名称'
|
||||
|
Loading…
Reference in New Issue
Block a user