diff --git a/build.gradle.kts b/build.gradle.kts index 8dc3a37..42090d3 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,7 +8,7 @@ plugins { allprojects { project.group = "net.momirealms" - project.version = "3.4.1.0" + project.version = "3.4.1.1" apply() apply(plugin = "java") diff --git a/plugin/src/main/java/net/momirealms/customcrops/mechanic/item/custom/AbstractCustomListener.java b/plugin/src/main/java/net/momirealms/customcrops/mechanic/item/custom/AbstractCustomListener.java index 6d5745f..5fbce50 100644 --- a/plugin/src/main/java/net/momirealms/customcrops/mechanic/item/custom/AbstractCustomListener.java +++ b/plugin/src/main/java/net/momirealms/customcrops/mechanic/item/custom/AbstractCustomListener.java @@ -20,6 +20,7 @@ package net.momirealms.customcrops.mechanic.item.custom; import net.momirealms.customcrops.api.CustomCropsPlugin; import net.momirealms.customcrops.api.manager.ConfigManager; import net.momirealms.customcrops.api.manager.WorldManager; +import net.momirealms.customcrops.api.mechanic.item.Crop; import net.momirealms.customcrops.api.mechanic.item.Pot; import net.momirealms.customcrops.api.mechanic.item.Sprinkler; import net.momirealms.customcrops.api.mechanic.item.WateringCan; @@ -107,6 +108,12 @@ public abstract class AbstractCustomListener implements Listener { Item item = event.getEntity(); ItemStack itemStack = item.getItemStack(); String itemID = this.itemManager.getItemID(itemStack); + Crop.Stage stage = this.itemManager.getCropStageByStageID(itemID); + if (stage != null) { + event.setCancelled(true); + return; + } + Sprinkler sprinkler = this.itemManager.getSprinklerBy3DItemID(itemID); if (sprinkler != null) { ItemStack newItem = this.itemManager.getItemStack(null, sprinkler.get2DItemID());