diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotMain.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotMain.java index a788c6762..d3d79f250 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotMain.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotMain.java @@ -1253,6 +1253,10 @@ import java.util.concurrent.TimeUnit; managers.remove(world); worlds.remove(world); } + + public static void removePlots(final String world) { + plots.put(world, new HashMap()); + } /** * Get all plots diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Purge.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Purge.java index a9bf7ed82..76fe5e6f8 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Purge.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Purge.java @@ -59,7 +59,8 @@ import org.bukkit.entity.Player; return true; } catch (final Exception e) { if (args.length == 1) { - PlayerFunctions.sendMessage(plr, "This is a dangerous command, if you are sure, use /plot purge {world} -o"); + PlayerFunctions.sendMessage(plr, "Use /plots purge ;;"); + PlayerFunctions.sendMessage(plr, "To purge all plots use /plots purge -o"); return false; } PlayerFunctions.sendMessage(plr, C.NOT_VALID_PLOT_ID); @@ -73,12 +74,13 @@ import org.bukkit.entity.Player; PlayerFunctions.sendMessage(plr, C.NOT_VALID_PLOT_WORLD); return false; } - PlotMain.removePlotWorld(args[0]); + PlotMain.removePlots(args[0]); DBFunc.purge(args[0]); PlayerFunctions.sendMessage(plr, (C.PURGE_SUCCESS)); return true; } else { - PlayerFunctions.sendMessage(plr, "This is a dangerous command, if you are sure, use /plot purge {world} -o"); + PlayerFunctions.sendMessage(plr, "Use /plots purge ;;"); + PlayerFunctions.sendMessage(plr, "To purge all plots use /plots purge -o"); return false; } } diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/database/SQLManager.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/database/SQLManager.java index 48e752280..238ed31a1 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/database/SQLManager.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/database/SQLManager.java @@ -866,7 +866,7 @@ public class SQLManager implements AbstractDB { stmt.executeUpdate(); stmt.close(); - stmt = SQLManager.this.connection.prepareStatement("DELETE FROM `" + prefix + "plot` WHERE `plot_plot_id` = " + idstr + ""); + stmt = SQLManager.this.connection.prepareStatement("DELETE FROM `" + prefix + "plot` WHERE `id` = " + idstr + ""); stmt.setString(1, world); stmt.executeUpdate(); stmt.close();