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 f7e1d7bce..2fd574adc 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Purge.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Purge.java @@ -107,17 +107,6 @@ public class Purge extends SubCommand { DBFunc.purgeIds(worldname, ids); return finishPurge(DBid == Integer.MAX_VALUE ? 1 : 0); } - final UUID uuid = UUIDHandler.getUUID(args[0]); - if (uuid != null) { - final Set plots = PlotSquared.getPlots(worldname, uuid); - final Set ids = new HashSet<>(); - for (final Plot plot : plots) { - ids.add(plot.id); - } - int length = ids.size(); - DBFunc.purge(worldname, ids); - return finishPurge(length); - } if (arg.equals("all")) { final Set ids = PlotSquared.getPlots(worldname).keySet(); int length = ids.size(); @@ -160,6 +149,17 @@ public class Purge extends SubCommand { DBFunc.purge(worldname, ids); return finishPurge(length); } + final UUID uuid = UUIDHandler.getUUID(args[0]); + if (uuid != null) { + final Set plots = PlotSquared.getPlots(worldname, uuid); + final Set ids = new HashSet<>(); + for (final Plot plot : plots) { + ids.add(plot.id); + } + int length = ids.size(); + DBFunc.purge(worldname, ids); + return finishPurge(length); + } MainUtil.sendMessage(plr, C.PURGE_SYNTAX); return false; } diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/config/C.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/config/C.java index 0184af139..f32d3e76d 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/config/C.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/config/C.java @@ -236,7 +236,7 @@ public enum C { * purge */ PURGE_SYNTAX("Use /plot purge "), - PURGE_SUCCESS("$4Successfully purge %s plots"), + PURGE_SUCCESS("$4Successfully purged %s plots"), /* * trim */