Fixed piston retract for pre 1.8

This commit is contained in:
boy0001 2015-03-12 23:41:11 +11:00
parent d0fe132c82
commit 76daef8440

View File

@ -546,13 +546,12 @@ public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotLi
} }
Plot plot = MainUtil.getPlot(loc); Plot plot = MainUtil.getPlot(loc);
if (plot != null) { if (plot != null) {
for (final Block b : event.getBlocks()) { final Block b = event.getRetractLocation().getBlock();
Location bloc = BukkitUtil.getLocation(b.getLocation()); Location bloc = BukkitUtil.getLocation(b.getLocation());
Plot newPlot = MainUtil.getPlot(bloc); Plot newPlot = MainUtil.getPlot(bloc);
if (!plot.equals(newPlot)) { if (!plot.equals(newPlot)) {
event.setCancelled(true); event.setCancelled(true);
return; return;
}
} }
} }
} }