9
0
mirror of https://github.com/Auxilor/EcoSkills.git synced 2026-01-02 05:46:57 +00:00

Fixed bug

This commit is contained in:
Auxilor
2021-08-21 11:34:31 +01:00
parent 2e07241eea
commit b38c931c5e

View File

@@ -107,11 +107,19 @@ fun Player.addStatModifier(modifier: StatModifier) {
modifierTag.set(amountKey, PersistentDataType.INTEGER, modifier.amount)
modifiers.set(modifier.key, PersistentDataType.TAG_CONTAINER, modifierTag)
for (stat in Stats.values()) {
stat.updateStatLevel(this)
}
}
fun Player.removeStatModifier(modifier: StatModifier) {
val modifiers = getModifiersTag(this)
modifiers.remove(modifier.key)
for (stat in Stats.values()) {
stat.updateStatLevel(this)
}
}
fun Player.getStatModifierKeys(): MutableSet<NamespacedKey> {