diff --git a/common/src/main/java/us/ajg0702/queue/commands/commands/manage/ManageCommand.java b/common/src/main/java/us/ajg0702/queue/commands/commands/manage/ManageCommand.java index d26fee21..31fd7295 100644 --- a/common/src/main/java/us/ajg0702/queue/commands/commands/manage/ManageCommand.java +++ b/common/src/main/java/us/ajg0702/queue/commands/commands/manage/ManageCommand.java @@ -2,6 +2,7 @@ import com.google.common.collect.ImmutableList; import net.kyori.adventure.text.Component; +import us.ajg0702.queue.api.commands.IBaseCommand; import us.ajg0702.queue.api.commands.ICommandSender; import us.ajg0702.queue.api.commands.ISubCommand; import us.ajg0702.queue.commands.BaseCommand; @@ -13,11 +14,14 @@ import java.util.Arrays; import java.util.List; import java.util.Locale; +import java.util.stream.Collectors; public class ManageCommand extends BaseCommand { final QueueMain main; + final Component usage; + public ManageCommand(QueueMain main) { this.main = main; @@ -38,6 +42,17 @@ public ManageCommand(QueueMain main) { addSubCommand(new Kick(main)); addSubCommand(new KickAll(main)); addSubCommand(new PauseQueueServer(main)); + + + + usage = main.getMessages().toComponent( + "/ajQueue &7<&r" + + subCommands.stream() + .filter(IBaseCommand::showInTabComplete) + .map(IBaseCommand::getName) + .collect(Collectors.joining("&7|&r")) + + "&7>&r" + ); } @@ -83,7 +98,7 @@ public void execute(ICommandSender sender, String[] args) { } } } - sender.sendMessage(Component.text("/ajQueue ")); + sender.sendMessage(usage); } @Override