diff --git a/api/src/main/java/net/momirealms/customcrops/api/mechanic/item/custom/AbstractCustomListener.java b/api/src/main/java/net/momirealms/customcrops/api/mechanic/item/custom/AbstractCustomListener.java index 5c4bbe6..e841c99 100644 --- a/api/src/main/java/net/momirealms/customcrops/api/mechanic/item/custom/AbstractCustomListener.java +++ b/api/src/main/java/net/momirealms/customcrops/api/mechanic/item/custom/AbstractCustomListener.java @@ -86,7 +86,8 @@ public abstract class AbstractCustomListener implements Listener { Material.TWISTING_VINES, Material.WEEPING_VINES, Material.KELP, - Material.CACTUS + Material.CACTUS, + Material.AIR ) ); if (VersionManager.isHigherThan1_19()) { @@ -164,14 +165,12 @@ public abstract class AbstractCustomListener implements Listener { public void onPlaceBlock(BlockPlaceEvent event) { final Block block = event.getBlock(); final Location location = block.getLocation(); + if (CUSTOM_MATERIAL.contains(block.getType())) { + return; + } Optional customCropsBlock = CustomCropsPlugin.get().getWorldManager().getBlockAt(SimpleLocation.of(location)); if (customCropsBlock.isPresent()) { - if (customCropsBlock.get() instanceof WorldPot || customCropsBlock.get() instanceof WorldGlass) { - CustomCropsPlugin.get().getWorldManager().removeAnythingAt(SimpleLocation.of(location)); - } else { - event.setCancelled(true); - return; - } + CustomCropsPlugin.get().getWorldManager().removeAnythingAt(SimpleLocation.of(location)); } this.onPlaceBlock( event.getPlayer(), diff --git a/build.gradle.kts b/build.gradle.kts index 2edf598..1c3a241 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,7 +8,7 @@ plugins { allprojects { project.group = "net.momirealms" - project.version = "3.5.10" + project.version = "3.5.11" apply() apply(plugin = "java")