mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-06 07:34:42 +02:00
Fix plot clear event not being called.
This commit is contained in:
@ -1234,8 +1234,11 @@ public class MainUtil
|
|||||||
clear(plot, isDelete, whenDone);
|
clear(plot, isDelete, whenDone);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean 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 PlotManager manager = PS.get().getPlotManager(plot.world);
|
||||||
final Location pos1 = MainUtil.getPlotBottomLoc(plot.world, plot.id).add(1, 0, 1);
|
final Location pos1 = MainUtil.getPlotBottomLoc(plot.world, plot.id).add(1, 0, 1);
|
||||||
@ -1268,9 +1271,10 @@ public class MainUtil
|
|||||||
if ((plotworld.TERRAIN != 0) || Settings.FAST_CLEAR)
|
if ((plotworld.TERRAIN != 0) || Settings.FAST_CLEAR)
|
||||||
{
|
{
|
||||||
final Location pos2 = MainUtil.getPlotTopLoc(plot.world, plot.id);
|
final Location pos2 = MainUtil.getPlotTopLoc(plot.world, plot.id);
|
||||||
ChunkManager.manager.regenerateRegion(pos1, pos2, run);
|
ChunkManager.manager.regenerateRegion(pos1, pos2, run);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
manager.clearPlot(plotworld, plot, run);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user