mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-23 05:36:45 +01:00
Fixes #1283
This commit is contained in:
parent
409456e895
commit
415c6fb0d4
@ -951,12 +951,12 @@ public class PlayerEvents extends PlotListener implements Listener {
|
|||||||
}
|
}
|
||||||
List<Block> blocks = event.getBlocks();
|
List<Block> blocks = event.getBlocks();
|
||||||
for (Block b : blocks) {
|
for (Block b : blocks) {
|
||||||
Location bloc = BukkitUtil.getLocation(b.getLocation().add(relative));
|
Location bloc = BukkitUtil.getLocation(b.getLocation());
|
||||||
if (!area.contains(bloc.getX(), bloc.getZ())) {
|
if (!area.contains(bloc.getX(), bloc.getZ()) || !area.contains(bloc.getX() + relative.getBlockX(), bloc.getZ() + relative.getBlockZ())) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!plot.equals(area.getOwnedPlot(bloc))) {
|
if (!plot.equals(area.getOwnedPlot(bloc)) || !plot.equals(area.getOwnedPlot(bloc.add(relative.getBlockX(), relative.getBlockY(), relative.getBlockZ())))) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1671,7 +1671,7 @@ public class PlayerEvents extends PlotListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (lastPlot != null && now.equals(lastPlot)) {
|
} else if (lastPlot != null && now.equals(lastPlot)) {
|
||||||
if (!Flags.DENY_TELEPORT.allowsTeleport(pp, lastPlot)) {
|
if (!Flags.TELEPORT_DENY.allowsTeleport(pp, lastPlot)) {
|
||||||
event.setTo(BukkitUtil.getLocation(lastPlot.getSide()));
|
event.setTo(BukkitUtil.getLocation(lastPlot.getSide()));
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@ -1744,7 +1744,7 @@ public class PlayerEvents extends PlotListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (lastPlot != null && now.equals(lastPlot)) {
|
} else if (lastPlot != null && now.equals(lastPlot)) {
|
||||||
if (!Flags.DENY_TELEPORT.allowsTeleport(pp, lastPlot)) {
|
if (!Flags.TELEPORT_DENY.allowsTeleport(pp, lastPlot)) {
|
||||||
event.setTo(BukkitUtil.getLocation(lastPlot.getSide()));
|
event.setTo(BukkitUtil.getLocation(lastPlot.getSide()));
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user