mirror of
https://github.com/Maxlego08/zKoth.git
synced 2024-11-22 11:55:12 +01:00
📝 Change auto completion
This commit is contained in:
parent
1e5720b526
commit
628e4135cf
@ -5,6 +5,7 @@
|
|||||||
- Create placeholder: ``%zkoth_capture_progress_bar%``
|
- Create placeholder: ``%zkoth_capture_progress_bar%``
|
||||||
- Create placeholder: ``%zkoth_progress_bar_score_points_<position>%``
|
- Create placeholder: ``%zkoth_progress_bar_score_points_<position>%``
|
||||||
- Create placeholder: ``%zkoth_progress_bar_score%``
|
- Create placeholder: ``%zkoth_progress_bar_score%``
|
||||||
|
- Change auto-completion for /koth stop
|
||||||
|
|
||||||
# 3.0.2
|
# 3.0.2
|
||||||
|
|
||||||
|
@ -320,4 +320,8 @@ public class KothManager extends ZUtils implements Savable {
|
|||||||
message(sender, Message.COMMAND_CREATE, "%command%", command);
|
message(sender, Message.COMMAND_CREATE, "%command%", command);
|
||||||
this.saveKoth(koth);
|
this.saveKoth(koth);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<String> getActiveNameKoths() {
|
||||||
|
return this.getEnableKoths().stream().map(Koth::getFileName).collect(Collectors.toList());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,21 +8,21 @@ import fr.maxlego08.koth.zcore.utils.commands.CommandType;
|
|||||||
|
|
||||||
public class CommandKothStop extends VCommand {
|
public class CommandKothStop extends VCommand {
|
||||||
|
|
||||||
public CommandKothStop(KothPlugin plugin) {
|
public CommandKothStop(KothPlugin plugin) {
|
||||||
super(plugin);
|
super(plugin);
|
||||||
this.setPermission(Permission.ZKOTH_STOP);
|
this.setPermission(Permission.ZKOTH_STOP);
|
||||||
this.addSubCommand("stop");
|
this.addSubCommand("stop");
|
||||||
this.setDescription(Message.DESCRIPTION_SPAWN);
|
this.setDescription(Message.DESCRIPTION_SPAWN);
|
||||||
this.addRequireArg("name", (a,b) -> plugin.getKothManager().getNameKoths());
|
this.addRequireArg("name", (a, b) -> plugin.getKothManager().getActiveNameKoths());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected CommandType perform(KothPlugin plugin) {
|
protected CommandType perform(KothPlugin plugin) {
|
||||||
|
|
||||||
String name = argAsString(0);
|
String name = argAsString(0);
|
||||||
this.manager.stopKoth(sender, name);
|
this.manager.stopKoth(sender, name);
|
||||||
|
|
||||||
return CommandType.SUCCESS;
|
return CommandType.SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user