Rename class, update nodes, update messages

This commit is contained in:
CocoTheOwner 2021-08-07 19:25:59 +02:00
parent 14d2ae0c0e
commit dff6048a07
2 changed files with 6 additions and 6 deletions

View File

@ -33,7 +33,7 @@ public class CommandIrisPregen extends MortarCommand {
private CommandIrisPregenStop stop; private CommandIrisPregenStop stop;
@Command @Command
private CommandIrisPregenToggle toggle; private CommandIrisPregenPause toggle;
public CommandIrisPregen() { public CommandIrisPregen() {
super("pregen", "preg", "p"); super("pregen", "preg", "p");

View File

@ -6,10 +6,10 @@ import com.volmit.iris.util.collection.KList;
import com.volmit.iris.util.plugin.MortarCommand; import com.volmit.iris.util.plugin.MortarCommand;
import com.volmit.iris.util.plugin.VolmitSender; import com.volmit.iris.util.plugin.VolmitSender;
public class CommandIrisPregenToggle extends MortarCommand { public class CommandIrisPregenPause extends MortarCommand {
public CommandIrisPregenToggle() { public CommandIrisPregenPause() {
super("toggle", "t", "pause", "continue", "p", "c"); super("pause", "toggle", "t", "continue", "resume", "p", "c", "unpause", "up");
requiresPermission(Iris.perm); requiresPermission(Iris.perm);
setCategory("Pregen"); setCategory("Pregen");
setDescription("Toggle an ongoing pregeneration task"); setDescription("Toggle an ongoing pregeneration task");
@ -18,9 +18,9 @@ public class CommandIrisPregenToggle extends MortarCommand {
@Override @Override
public boolean handle(VolmitSender sender, String[] args) { public boolean handle(VolmitSender sender, String[] args) {
if (PregeneratorJob.pauseResume()){ if (PregeneratorJob.pauseResume()){
sender.sendMessage("Toggled pregeneration task, now: " + (PregeneratorJob.isPaused() ? "Paused" : "Running")); sender.sendMessage("Paused/unpaused pregeneration task, now: " + (PregeneratorJob.isPaused() ? "Paused" : "Running") + ".");
} else { } else {
sender.sendMessage("No active pregeneration tasks to toggle"); sender.sendMessage("No active pregeneration tasks to pause/unpause.");
} }
return true; return true;
} }