diff --git a/Core/src/main/java/com/intellectualcrafters/plot/commands/DebugExec.java b/Core/src/main/java/com/intellectualcrafters/plot/commands/DebugExec.java index 83a254856..2ab320944 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/commands/DebugExec.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/commands/DebugExec.java @@ -151,7 +151,7 @@ public class DebugExec extends SubCommand { @Override public boolean onCommand(final PlotPlayer player, String[] args) { List allowed_params = - Arrays.asList("calibrate-analysis", "remove-flag", "stop-expire", "start-expire", "show-expired", "update-expired", "seen", "list-scripts"); + Arrays.asList("calibrate-analysis", "remove-flag", "stop-expire", "start-expire", "show-expired", "seen", "list-scripts"); if (args.length > 0) { String arg = args[0].toLowerCase(); String script; diff --git a/Core/src/main/java/com/intellectualcrafters/plot/commands/Reload.java b/Core/src/main/java/com/intellectualcrafters/plot/commands/Reload.java index d5b0e57b4..37092ac9c 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/commands/Reload.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/commands/Reload.java @@ -32,7 +32,7 @@ public class Reload extends SubCommand { public void run(PlotArea area) { ConfigurationSection worldSection = PS.get().worlds.getConfigurationSection("worlds." + area.worldname); if (worldSection == null) { - worldSection = PS.get().worlds.createSection("worlds." + area.worldname); + return; } if (area.TYPE != 2 || !worldSection.contains("areas")) { area.saveConfiguration(worldSection); diff --git a/Core/src/main/java/com/intellectualcrafters/plot/commands/Toggle.java b/Core/src/main/java/com/intellectualcrafters/plot/commands/Toggle.java index 9bc3423f1..631ad7687 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/commands/Toggle.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/commands/Toggle.java @@ -54,7 +54,7 @@ public class Toggle extends Command { permission = "plots.toggle.chat", description = "Toggle plot chat") public void chat(Command command, PlotPlayer player, String[] args, RunnableVal3 confirm, - RunnableVal2 whenDone) { + RunnableVal2 whenDone) { if (toggle(player, "chat")) { MainUtil.sendMessage(player, C.TOGGLE_DISABLED, command.toString()); } else { @@ -62,6 +62,19 @@ public class Toggle extends Command { } } + @CommandDeclaration( + command = "clear-confirmation", + permission = "plots.admin.command.autoclear", + description = "Toggle autoclear confirmation") + public void clearConfirmation(Command command, PlotPlayer player, String[] args, RunnableVal3 confirm, + RunnableVal2 whenDone) { + if (toggle(player, "clear-confirmation")) { + MainUtil.sendMessage(player, C.TOGGLE_DISABLED, command.toString()); + } else { + MainUtil.sendMessage(player, C.TOGGLE_ENABLED, command.toString()); + } + } + @CommandDeclaration( command = "titles", permission = "plots.toggle.titles", @@ -70,7 +83,7 @@ public class Toggle extends Command { RunnableVal2 whenDone) { PlotArea area = player.getApplicablePlotArea(); boolean chat = area == null ? false : area.PLOT_CHAT; - if (toggle(player, "disabletitles") != chat) { + if (toggle(player, "ignoreExpireTask") != chat) { MainUtil.sendMessage(player, C.TOGGLE_ENABLED, command.toString()); } else { MainUtil.sendMessage(player, C.TOGGLE_DISABLED, command.toString()); diff --git a/Core/src/main/java/com/intellectualcrafters/plot/commands/Trim.java b/Core/src/main/java/com/intellectualcrafters/plot/commands/Trim.java index 674c0cc3d..df68122fb 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/commands/Trim.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/commands/Trim.java @@ -15,6 +15,7 @@ import com.intellectualcrafters.plot.util.TaskManager; import com.intellectualcrafters.plot.util.WorldUtil; import com.intellectualcrafters.plot.util.block.GlobalBlockQueue; import com.intellectualcrafters.plot.util.block.LocalBlockQueue; +import com.intellectualcrafters.plot.util.expiry.ExpireManager; import com.plotsquared.general.commands.CommandDeclaration; import java.io.File; @@ -101,6 +102,9 @@ public class Trim extends SubCommand { MainUtil.sendMessage(null, "Collecting region data..."); ArrayList plots = new ArrayList<>(); plots.addAll(PS.get().getPlots(world)); + if (ExpireManager.IMP != null) { + plots.removeAll(ExpireManager.IMP.getPendingExpired()); + } result.value1 = new HashSet<>(ChunkManager.manager.getChunkChunks(world)); result.value2 = new HashSet<>(); MainUtil.sendMessage(null, " - MCA #: " + result.value1.size());