diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugExec.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugExec.java index 4954431c3..28b4971aa 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugExec.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugExec.java @@ -35,6 +35,7 @@ import org.bukkit.Bukkit; import com.intellectualcrafters.plot.PlotSquared; import com.intellectualcrafters.plot.config.C; +import com.intellectualcrafters.plot.flag.FlagManager; import com.intellectualcrafters.plot.generator.BukkitHybridUtils; import com.intellectualcrafters.plot.generator.HybridUtils; import com.intellectualcrafters.plot.object.ChunkLoc; @@ -54,7 +55,7 @@ public class DebugExec extends SubCommand { @Override public boolean execute(final PlotPlayer player, final String... args) { - final List allowed_params = Arrays.asList(new String[] { "stop-expire", "start-expire", "show-expired", "update-expired", "seen", "trim-check" }); + final List allowed_params = Arrays.asList(new String[] { "reset-modified", "stop-expire", "start-expire", "show-expired", "update-expired", "seen", "trim-check" }); if (args.length > 0) { final String arg = args[0].toLowerCase(); switch (arg) { @@ -67,6 +68,14 @@ public class DebugExec extends SubCommand { ExpireManager.task = -1; return MainUtil.sendMessage(player, "Cancelled task."); } + case "reset-modified": { + for (Plot plot : PlotSquared.getPlots()) { + if (FlagManager.getPlotFlag(plot, "modified-blocks") != null) { + FlagManager.removePlotFlag(plot, "modified-blocks"); + } + } + return MainUtil.sendMessage(player, "Cleared modified flag!"); + } case "start-rgar": { if (args.length != 2) { PlotSquared.log("&cInvalid syntax: /plot debugexec start-rgar "); diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Visit.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Visit.java index 633b5a7f8..49ba9c086 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Visit.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Visit.java @@ -64,7 +64,7 @@ public class Visit extends SubCommand { plots.addAll(PlotSquared.getPlots(args[0]).values()); } else { - Plot plot = MainUtil.getPlotFromString(plr, args[0], false); + Plot plot = MainUtil.getPlotFromString(plr, args[0], true); if (plot == null) { return false; }