This commit is contained in:
Jesse Boyd 2018-05-17 14:50:47 +10:00
parent 5cb94f3e45
commit 98b7a84119
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

@ -1230,8 +1230,9 @@ public class PlayerEvents extends PlotListener implements Listener {
Plot plot = area.getOwnedPlot(location); Plot plot = area.getOwnedPlot(location);
if (this.pistonBlocks) { if (this.pistonBlocks) {
try { try {
BlockFace dir = event.getDirection();
for (Block pulled : event.getBlocks()) { for (Block pulled : event.getBlocks()) {
location = BukkitUtil.getLocation(pulled.getLocation()); location = BukkitUtil.getLocation(pulled.getLocation().add(dir.getModX(), dir.getModY(), dir.getModZ()));
if (!area.contains(location.getX(), location.getZ())) { if (!area.contains(location.getX(), location.getZ())) {
event.setCancelled(true); event.setCancelled(true);
return; return;