diff --git a/pom.xml b/pom.xml index 97e3814..4afacf5 100644 --- a/pom.xml +++ b/pom.xml @@ -54,7 +54,7 @@ ${build.version}-SNAPSHOT - 1.5.0 + 1.5.1 -LOCAL bentobox-world https://sonarcloud.io diff --git a/src/main/java/world/bentobox/twerk/listeners/TreeGrowListener.java b/src/main/java/world/bentobox/twerk/listeners/TreeGrowListener.java index 96025ca..2c340d4 100644 --- a/src/main/java/world/bentobox/twerk/listeners/TreeGrowListener.java +++ b/src/main/java/world/bentobox/twerk/listeners/TreeGrowListener.java @@ -31,6 +31,7 @@ import org.bukkit.event.world.StructureGrowEvent; import org.eclipse.jdt.annotation.NonNull; +import world.bentobox.bentobox.BentoBox; import world.bentobox.bentobox.database.objects.Island; import world.bentobox.bentobox.lists.Flags; import world.bentobox.bentobox.util.Util; @@ -134,8 +135,9 @@ protected void growTree(Block b) { b.setType(Material.AIR); if (b.getWorld().generateTree(b.getLocation(), RAND, type, - bs -> Flags.TREES_GROWING_OUTSIDE_RANGE.isSetForWorld(bs.getWorld()) - || addon.getIslands().getProtectedIslandAt(bs.getLocation()).isPresent())) { + bs -> bs.getType() != Material.DIRT + && (Flags.TREES_GROWING_OUTSIDE_RANGE.isSetForWorld(bs.getWorld()) + || addon.getIslands().getProtectedIslandAt(bs.getLocation()).isPresent()))) { if (addon.getSettings().isEffectsEnabled()) { showSparkles(b); }