mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2025-02-19 05:01:40 +01:00
Fix Soulbound with single-use option
Problem fixed: Items with the soulbound enchantment are removed after the second death
This commit is contained in:
parent
ecb9b4e96d
commit
f725d5beda
@ -131,7 +131,9 @@ class EnchantmentSoulbound(
|
||||
ignoreCancelled = true
|
||||
)
|
||||
fun preventDroppingSoulboundItems(event: PlayerDeathEvent) {
|
||||
event.drops.removeIf { it.fast().persistentDataContainer.has(soulboundKey, PersistentDataType.INTEGER) }
|
||||
event.drops.removeIf { it.fast().persistentDataContainer.has(soulboundKey, PersistentDataType.INTEGER)
|
||||
&& it.itemMeta.hasEnchant(enchant)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user