mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-11-28 16:05:14 +01:00
Soulbound now uses a native paper API
This commit is contained in:
parent
b86f030422
commit
c0eadf6959
@ -1,6 +1,7 @@
|
||||
package com.willfp.ecoenchants.enchants.impl
|
||||
|
||||
import com.willfp.eco.core.EcoPlugin
|
||||
import com.willfp.eco.core.Prerequisite
|
||||
import com.willfp.eco.core.data.keys.PersistentDataKey
|
||||
import com.willfp.eco.core.data.keys.PersistentDataKeyType
|
||||
import com.willfp.eco.core.data.profile
|
||||
@ -80,6 +81,12 @@ class EnchantmentSoulbound(
|
||||
|
||||
event.drops.removeAll(items)
|
||||
|
||||
// Use native paper method
|
||||
if (Prerequisite.HAS_PAPER.isMet) {
|
||||
event.itemsToKeep += items
|
||||
return
|
||||
}
|
||||
|
||||
for (item in items) {
|
||||
item.fast().persistentDataContainer.set(soulboundKey, PersistentDataType.INTEGER, 1)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user