add protocol debug command
This commit is contained in:
@@ -21,15 +21,19 @@ public class ManageCommand extends BaseCommand {
|
||||
public ManageCommand(QueueMain main) {
|
||||
this.main = main;
|
||||
|
||||
addSubCommand(new Reload(main));
|
||||
//debug commands
|
||||
addSubCommand(new Protocol(main));
|
||||
addSubCommand(new ISP(main));
|
||||
addSubCommand(new PermissionList(main));
|
||||
addSubCommand(new Tasks(main));
|
||||
addSubCommand(new Version(main));
|
||||
addSubCommand(new Whitelist(main));
|
||||
|
||||
//normal commands
|
||||
addSubCommand(new Reload(main));
|
||||
addSubCommand(new Pause(main));
|
||||
addSubCommand(new ISP(main));
|
||||
addSubCommand(new QueueList(main));
|
||||
addSubCommand(new Send(main));
|
||||
addSubCommand(new PermissionList(main));
|
||||
addSubCommand(new Whitelist(main));
|
||||
addSubCommand(new Update(main));
|
||||
addSubCommand(new Kick(main));
|
||||
addSubCommand(new KickAll(main));
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
package us.ajg0702.queue.commands.commands.manage.debug;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import us.ajg0702.queue.api.commands.ICommandSender;
|
||||
import us.ajg0702.queue.commands.SubCommand;
|
||||
import us.ajg0702.queue.common.QueueMain;
|
||||
import us.ajg0702.utils.common.Messages;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class Protocol extends SubCommand {
|
||||
|
||||
final QueueMain main;
|
||||
public Protocol(QueueMain main) {
|
||||
this.main = main;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "protocol";
|
||||
}
|
||||
|
||||
@Override
|
||||
public ImmutableList<String> getAliases() {
|
||||
return ImmutableList.of();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean showInTabComplete() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPermission() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Messages getMessages() {
|
||||
return main.getMessages();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(ICommandSender sender, String[] args) {
|
||||
if(!checkPermission(sender)) return;
|
||||
if(!sender.isPlayer()) return;
|
||||
sender.sendMessage(Component.text(main.getPlatformMethods().senderToPlayer(sender).getProtocolVersion()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> autoComplete(ICommandSender sender, String[] args) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user