diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/effects/effects/EffectSpelunking.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/effects/effects/EffectSpelunking.kt index 344f9f8..79f8f98 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/effects/effects/EffectSpelunking.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/effects/effects/EffectSpelunking.kt @@ -78,9 +78,11 @@ class EffectSpelunking : Effect( val dropEvent = BlockDropItemEvent(block, block.state, player, event.items.map { item -> val stack = item.itemStack stack.amount = stack.amount * amount - if (stack.type == Material.AIR) return@map null + if (stack.type == Material.AIR || stack.amount <= 0) { + return@map null + } item.itemStack = stack - if(stack.type == Material.AIR) null else item + item }.filter { Objects.nonNull(it) }.toMutableList()) noRepeat.add(dropEvent)