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);
if (this.pistonBlocks) {
try {
BlockFace dir = event.getDirection();
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())) {
event.setCancelled(true);
return;