9
0
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:
Auxilor
2021-10-22 18:59:04 +01:00
parent 9227524d0c
commit d572ced1b8

View File

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