mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-14 03:14:42 +02:00
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:
2
pom.xml
2
pom.xml
@ -8,7 +8,7 @@
|
|||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
</properties>
|
</properties>
|
||||||
<artifactId>PlotSquared</artifactId>
|
<artifactId>PlotSquared</artifactId>
|
||||||
<version>3.2.4</version>
|
<version>3.2.6</version>
|
||||||
<name>PlotSquared</name>
|
<name>PlotSquared</name>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<build>
|
<build>
|
||||||
|
@ -926,10 +926,12 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
final Block b = e.getToBlock();
|
final Block b = e.getToBlock();
|
||||||
final Location loc = BukkitUtil.getLocation(b.getLocation());
|
final Location loc = BukkitUtil.getLocation(b.getLocation());
|
||||||
if (PS.get().isPlotWorld(loc.getWorld())) {
|
if (PS.get().isPlotWorld(loc.getWorld())) {
|
||||||
|
if (MainUtil.isPlotRoad(loc)) {
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
final Plot plot = MainUtil.getPlot(loc);
|
final Plot plot = MainUtil.getPlot(loc);
|
||||||
|
if ((plot != null) && FlagManager.isPlotFlagTrue(plot, "disable-physics")) {
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -942,6 +944,7 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
final Block b = e.getBlock();
|
final Block b = e.getBlock();
|
||||||
final Location loc = BukkitUtil.getLocation(b.getLocation());
|
final Location loc = BukkitUtil.getLocation(b.getLocation());
|
||||||
if (PS.get().isPlotWorld(loc.getWorld())) {
|
if (PS.get().isPlotWorld(loc.getWorld())) {
|
||||||
|
if (MainUtil.isPlotRoad(loc)) {
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1028,7 +1031,10 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
final List<BlockState> blocks = e.getBlocks();
|
final List<BlockState> blocks = e.getBlocks();
|
||||||
if (blocks.size() == 0) {
|
if (blocks.size() == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
final Plot origin = MainUtil.getPlot(BukkitUtil.getLocation(blocks.get(0).getLocation()));
|
||||||
|
if (origin == null) {
|
||||||
|
e.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (int i = blocks.size() - 1; i >= 0; i--) {
|
for (int i = blocks.size() - 1; i >= 0; i--) {
|
||||||
|
Binary file not shown.
Reference in New Issue
Block a user