Fix #1085
This commit is contained in:
manuelgu 2016-05-16 04:05:52 +02:00 committed by Matt
parent 64f3e8f79b
commit 18e3a7553e

View File

@ -1072,7 +1072,13 @@ public class PlayerEvents extends PlotListener implements Listener {
for (int i = blocks.size() - 1; i >= 0; i--) { for (int i = blocks.size() - 1; i >= 0; i--) {
location = BukkitUtil.getLocation(blocks.get(i).getLocation()); location = BukkitUtil.getLocation(blocks.get(i).getLocation());
Plot plot = area.getOwnedPlot(location); Plot plot = area.getOwnedPlot(location);
if (!Objects.equals(plot, origin)) { /*
* plot -> the base plot of the merged area
* origin -> the plot where the event gets called
*/
// Are plot and origin not the same AND are both plots merged
if (!Objects.equals(plot, origin) && (!plot.isMerged() && !origin.isMerged())) {
event.getBlocks().remove(i); event.getBlocks().remove(i);
} }
} }