Fix structure growth on roads (from big trees on plot edges)

Possible unresolved issue (TODO)
- big tree growth on plot edges with 0 road width
This commit is contained in:
Jesse Boyd 2015-09-29 19:50:05 +10:00
parent b9bb9f5674
commit 3bd4895676
3 changed files with 8 additions and 2 deletions

View File

@ -8,7 +8,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<artifactId>PlotSquared</artifactId>
<version>3.2.4</version>
<version>3.2.6</version>
<name>PlotSquared</name>
<packaging>jar</packaging>
<build>

View File

@ -926,10 +926,12 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
if (PS.get().isPlotWorld(loc.getWorld())) {
if (MainUtil.isPlotRoad(loc)) {
e.setCancelled(true);
return;
} else {
final Plot plot = MainUtil.getPlot(loc);
if ((plot != null) && FlagManager.isPlotFlagTrue(plot, "disable-physics")) {
e.setCancelled(true);
return;
}
}
}
@ -942,6 +944,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
if (PS.get().isPlotWorld(loc.getWorld())) {
if (MainUtil.isPlotRoad(loc)) {
e.setCancelled(true);
return;
}
}
}
@ -1028,7 +1031,10 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
return;
}
final Plot origin = MainUtil.getPlot(BukkitUtil.getLocation(blocks.get(0).getLocation()));
blocks.get(0);
if (origin == null) {
e.setCancelled(true);
return;
}
for (int i = blocks.size() - 1; i >= 0; i--) {
final Location loc = BukkitUtil.getLocation(blocks.get(i).getLocation());
final Plot plot = MainUtil.getPlot(loc);

Binary file not shown.