From c163446f7e63159e3c58fe7e7426577e911b5faa Mon Sep 17 00:00:00 2001 From: boy0001 Date: Sun, 13 Sep 2015 13:33:18 +1000 Subject: [PATCH] Fix plot clear event not being called. --- .../java/com/intellectualcrafters/plot/util/MainUtil.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/intellectualcrafters/plot/util/MainUtil.java b/src/main/java/com/intellectualcrafters/plot/util/MainUtil.java index 51af4e1ce..dc7ef1e98 100644 --- a/src/main/java/com/intellectualcrafters/plot/util/MainUtil.java +++ b/src/main/java/com/intellectualcrafters/plot/util/MainUtil.java @@ -1234,8 +1234,11 @@ public class MainUtil return true; } - public static void clear(final Plot plot, final boolean isDelete, final Runnable whenDone) + public static boolean clear(final Plot plot, final boolean isDelete, final Runnable whenDone) { + if (!EventUtil.manager.callClear(plot.world, plot.id)) { + return false; + } final PlotManager manager = PS.get().getPlotManager(plot.world); final Location pos1 = MainUtil.getPlotBottomLoc(plot.world, plot.id).add(1, 0, 1); final PlotWorld plotworld = PS.get().getPlotWorld(plot.world); @@ -1268,9 +1271,10 @@ public class MainUtil { final Location pos2 = MainUtil.getPlotTopLoc(plot.world, plot.id); ChunkManager.manager.regenerateRegion(pos1, pos2, run); - return; + return true; } manager.clearPlot(plotworld, plot, run); + return true; } public static void setCuboid(final String world, final Location pos1, final Location pos2, final PlotBlock[] blocks)