mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-23 05:36:45 +01:00
growth
This commit is contained in:
parent
923a78a927
commit
e6c3c143b6
@ -498,24 +498,12 @@ 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) {
|
|
||||||
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());
|
final Location loc = BukkitUtil.getLocation(blocks.get(i).getLocation());
|
||||||
if (!isPlotArea(loc)) {
|
Plot plot = getCurrentPlot(loc);
|
||||||
remove = true;
|
if (plot == null || !plot.hasOwner()) {
|
||||||
e.getBlocks().remove(i);
|
e.getBlocks().remove(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||||
|
Loading…
Reference in New Issue
Block a user