Skip to content

Commit 6250e9a

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents fb74948 + dad6aca commit 6250e9a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/java/dev/jsinco/brewery/garden/objects/GardenPlant.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package dev.jsinco.brewery.garden.objects;
22

3+
import com.destroystokyo.paper.MaterialTags;
34
import com.dre.brewery.utility.Logging;
45
import dev.jsinco.brewery.garden.BreweryGarden;
56
import dev.jsinco.brewery.garden.configuration.BreweryGardenConfig;
@@ -13,6 +14,7 @@
1314
import org.bukkit.Location;
1415
import org.bukkit.Material;
1516
import org.bukkit.Particle;
17+
import org.bukkit.Tag;
1618
import org.bukkit.block.Block;
1719
import org.bukkit.block.data.type.Leaves;
1820
import org.jetbrains.annotations.Nullable;
@@ -103,7 +105,9 @@ public boolean unPlace() {
103105
} else if (block.getType() == Material.PLAYER_HEAD) {
104106
block.getWorld().dropItemNaturally(block.getLocation(), this.type.getItemStack(1));
105107
}
106-
block.setType(Material.AIR);
108+
if(MaterialTags.WOODEN_FENCES.isTagged(block) || Tag.LEAVES.isTagged(block.getType())) {
109+
block.setType(Material.AIR);
110+
}
107111
}
108112
return true;
109113
}

0 commit comments

Comments
 (0)