Correct main block

This commit is contained in:
boy0001 2015-06-25 06:33:43 +10:00
parent d09329aba1
commit 3fc262d1b3
2 changed files with 11 additions and 2 deletions

View File

@ -35,6 +35,7 @@ import org.bukkit.Bukkit;
import com.intellectualcrafters.plot.PlotSquared; import com.intellectualcrafters.plot.PlotSquared;
import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.flag.FlagManager;
import com.intellectualcrafters.plot.generator.BukkitHybridUtils; import com.intellectualcrafters.plot.generator.BukkitHybridUtils;
import com.intellectualcrafters.plot.generator.HybridUtils; import com.intellectualcrafters.plot.generator.HybridUtils;
import com.intellectualcrafters.plot.object.ChunkLoc; import com.intellectualcrafters.plot.object.ChunkLoc;
@ -54,7 +55,7 @@ public class DebugExec extends SubCommand {
@Override @Override
public boolean execute(final PlotPlayer player, final String... args) { public boolean execute(final PlotPlayer player, final String... args) {
final List<String> allowed_params = Arrays.asList(new String[] { "stop-expire", "start-expire", "show-expired", "update-expired", "seen", "trim-check" }); final List<String> allowed_params = Arrays.asList(new String[] { "reset-modified", "stop-expire", "start-expire", "show-expired", "update-expired", "seen", "trim-check" });
if (args.length > 0) { if (args.length > 0) {
final String arg = args[0].toLowerCase(); final String arg = args[0].toLowerCase();
switch (arg) { switch (arg) {
@ -67,6 +68,14 @@ public class DebugExec extends SubCommand {
ExpireManager.task = -1; ExpireManager.task = -1;
return MainUtil.sendMessage(player, "Cancelled task."); 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": { case "start-rgar": {
if (args.length != 2) { if (args.length != 2) {
PlotSquared.log("&cInvalid syntax: /plot debugexec start-rgar <world>"); PlotSquared.log("&cInvalid syntax: /plot debugexec start-rgar <world>");

View File

@ -64,7 +64,7 @@ public class Visit extends SubCommand {
plots.addAll(PlotSquared.getPlots(args[0]).values()); plots.addAll(PlotSquared.getPlots(args[0]).values());
} }
else { else {
Plot plot = MainUtil.getPlotFromString(plr, args[0], false); Plot plot = MainUtil.getPlotFromString(plr, args[0], true);
if (plot == null) { if (plot == null) {
return false; return false;
} }