9
0
mirror of https://github.com/Auxilor/EcoSkills.git synced 2026-01-03 06:12:21 +00:00

i am going to die here

This commit is contained in:
Auxilor
2021-08-28 19:48:28 +01:00
parent 3aa615a00c
commit 628448dca3

View File

@@ -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)