This commit is contained in:
boy0001 2015-02-20 21:25:58 +11:00
parent 923a78a927
commit e6c3c143b6

View File

@ -498,23 +498,11 @@ public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotLi
final List<BlockState> blocks = e.getBlocks(); final List<BlockState> blocks = e.getBlocks();
boolean remove = false; boolean remove = false;
for (int i = blocks.size() - 1; i >= 0; i--) { for (int i = blocks.size() - 1; i >= 0; i--) {
if (remove) { final Location loc = BukkitUtil.getLocation(blocks.get(i).getLocation());
Plot plot = getCurrentPlot(loc);
if (plot == null || !plot.hasOwner()) {
e.getBlocks().remove(i); e.getBlocks().remove(i);
remove = true;
if (!isInPlot(loc)) {
if (isPlotArea(loc)) {
e.getBlocks().remove(i);
}
}
} }
else {
final Location loc = BukkitUtil.getLocation(blocks.get(i).getLocation());
if (!isPlotArea(loc)) {
remove = true;
e.getBlocks().remove(i);
}
}
} }
} }