mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 18:23:06 +00:00
Rename class, update nodes, update messages
This commit is contained in:
parent
14d2ae0c0e
commit
dff6048a07
@ -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");
|
||||||
|
@ -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;
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user