Fixed piston retract

This commit is contained in:
boy0001 2015-03-14 18:57:58 +11:00
parent fb076adfab
commit 421a7dfb99

View File

@ -546,8 +546,7 @@ 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) {
final Block b = event.getRetractLocation().getBlock(); Location bloc = BukkitUtil.getLocation(block.getLocation().subtract(block.getRelative(event.getDirection()).getRelative(event.getDirection()).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);