Allow for console plot clearing.

This commit is contained in:
Sauilitired 2014-11-08 21:00:43 +01:00
parent a39d50843e
commit 4df3535a43
5 changed files with 59 additions and 16 deletions

View file

@ -706,6 +706,12 @@ public class PlotHelper {
* @param plot
*/
public static void clear(final Player requester, final Plot plot) {
if (requester == null) {
clearAllEntities(plot.getWorld(), plot, false);
clear(plot.getWorld(), plot);
removeSign(plot.getWorld(), plot);
return;
}
if (runners.containsKey(plot)) {
PlayerFunctions.sendMessage(requester, C.WAIT_FOR_TIMER);
return;
@ -716,11 +722,7 @@ public class PlotHelper {
final long start = System.nanoTime();
final World world;
if (requester != null) {
world = requester.getWorld();
} else {
world = Bukkit.getWorld(plot.world);
}
world = requester.getWorld();
/*
* keep
@ -730,7 +732,6 @@ public class PlotHelper {
removeSign(world, plot);
PlayerFunctions.sendMessage(requester, C.CLEARING_DONE.s().replaceAll("%time%", "" + ((System.nanoTime() - start) / 1000000.0)));
return;
}
public static void setCuboid(final World world, final Location pos1, final Location pos2, final PlotBlock[] blocks) {