📝 Change auto completion

This commit is contained in:
Maxlego08 2024-03-04 16:42:02 +01:00
parent 1e5720b526
commit 628e4135cf
3 changed files with 19 additions and 14 deletions

View File

@ -5,6 +5,7 @@
- Create placeholder: ``%zkoth_capture_progress_bar%``
- Create placeholder: ``%zkoth_progress_bar_score_points_<position>%``
- Create placeholder: ``%zkoth_progress_bar_score%``
- Change auto-completion for /koth stop
# 3.0.2

View File

@ -320,4 +320,8 @@ public class KothManager extends ZUtils implements Savable {
message(sender, Message.COMMAND_CREATE, "%command%", command);
this.saveKoth(koth);
}
public List<String> getActiveNameKoths() {
return this.getEnableKoths().stream().map(Koth::getFileName).collect(Collectors.toList());
}
}

View File

@ -13,7 +13,7 @@ public class CommandKothStop extends VCommand {
this.setPermission(Permission.ZKOTH_STOP);
this.addSubCommand("stop");
this.setDescription(Message.DESCRIPTION_SPAWN);
this.addRequireArg("name", (a,b) -> plugin.getKothManager().getNameKoths());
this.addRequireArg("name", (a, b) -> plugin.getKothManager().getActiveNameKoths());
}
@Override