mirror of
https://github.com/Auxilor/EcoSkills.git
synced 2026-01-02 13:56:38 +00:00
Fixed removing stat modifiers not working
This commit is contained in:
@@ -59,6 +59,8 @@ fun ItemStack.removeStatModifier(modifier: ItemStatModifier) {
|
||||
|
||||
modifiers.remove(modifier.key)
|
||||
|
||||
meta.persistentDataContainer.applyModifiers(modifiers)
|
||||
|
||||
this.itemMeta = meta
|
||||
}
|
||||
|
||||
@@ -125,6 +127,8 @@ fun Player.removeStatModifier(modifier: StatModifier) {
|
||||
val modifiers = getModifiersTag(this)
|
||||
modifiers.remove(modifier.key)
|
||||
|
||||
this.persistentDataContainer.applyModifiers(modifiers)
|
||||
|
||||
for (stat in Stats.values()) {
|
||||
stat.updateStatLevel(this)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user