Skip to content

Commit

Permalink
Improve /ajQueue usage hint
Browse files Browse the repository at this point in the history
  • Loading branch information
ajgeiss0702 committed Dec 18, 2023
1 parent 042e28b commit b36df72
Showing 1 changed file with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;

Expand All @@ -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"
);
}


Expand Down Expand Up @@ -83,7 +98,7 @@ public void execute(ICommandSender sender, String[] args) {
}
}
}
sender.sendMessage(Component.text("/ajQueue <reload|list|send|pause>"));
sender.sendMessage(usage);
}

@Override
Expand Down

0 comments on commit b36df72

Please sign in to comment.