🐛 Fix commands

This commit is contained in:
Maxlego08 2022-12-11 12:06:17 +01:00
parent c4ff47e3af
commit 201ab73e11
3 changed files with 14 additions and 0 deletions

View File

@ -1,5 +1,8 @@
package fr.maxlego08.zkoth.command.commands;
import java.util.Arrays;
import java.util.stream.Collectors;
import fr.maxlego08.zkoth.ZKothPlugin;
import fr.maxlego08.zkoth.command.VCommand;
import fr.maxlego08.zkoth.zcore.enums.Message;
@ -11,6 +14,7 @@ public class CommandKothSetCapture extends VCommand {
public CommandKothSetCapture(ZKothPlugin plugin) {
super(plugin);
this.addCompletion(0, (a, b) -> plugin.getKothManager().getKothNames());
this.addCompletion(1, (a, b) -> Arrays.asList(10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190).stream().map(e -> e.toString()).collect(Collectors.toList()));
this.setPermission(Permission.ZKOTH_SETCAPTURE);
this.addSubCommand("setcapture", "setcap");
this.setDescription(Message.DESCRIPTION_CAPTURE);

View File

@ -1,5 +1,8 @@
package fr.maxlego08.zkoth.command.commands;
import java.util.Arrays;
import java.util.stream.Collectors;
import fr.maxlego08.zkoth.ZKothPlugin;
import fr.maxlego08.zkoth.command.VCommand;
import fr.maxlego08.zkoth.zcore.enums.Message;
@ -11,9 +14,11 @@ public class CommandKothSetPoints extends VCommand {
public CommandKothSetPoints(ZKothPlugin plugin) {
super(plugin);
this.addCompletion(0, (a, b) -> plugin.getKothManager().getKothNames());
this.addCompletion(1, (a, b) -> Arrays.asList(10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190).stream().map(e -> e.toString()).collect(Collectors.toList()));
this.setPermission(Permission.ZKOTH_POINTS);
this.addSubCommand("setpoints");
this.setDescription(Message.DESCRIPTION_POINTS);
this.addRequireArg("name");
this.addRequireArg("points");
}

View File

@ -1,5 +1,8 @@
package fr.maxlego08.zkoth.command.commands;
import java.util.Arrays;
import java.util.stream.Collectors;
import fr.maxlego08.zkoth.ZKothPlugin;
import fr.maxlego08.zkoth.command.VCommand;
import fr.maxlego08.zkoth.zcore.enums.Message;
@ -11,9 +14,11 @@ public class CommandKothSetTimer extends VCommand {
public CommandKothSetTimer(ZKothPlugin plugin) {
super(plugin);
this.addCompletion(0, (a, b) -> plugin.getKothManager().getKothNames());
this.addCompletion(1, (a, b) -> Arrays.asList(10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190).stream().map(e -> e.toString()).collect(Collectors.toList()));
this.setPermission(Permission.ZKOTH_TIMER);
this.addSubCommand("settimer");
this.setDescription(Message.DESCRIPTION_TIMER);
this.addRequireArg("name");
this.addRequireArg("seconds");
}