9
0
mirror of https://github.com/Auxilor/EcoSkills.git synced 2026-01-02 13:56:38 +00:00

Added cleanup from broken playerdata

This commit is contained in:
Auxilor
2021-08-27 16:49:15 +01:00
parent dfe31fa29f
commit 5e59ca9f3f

View File

@@ -37,6 +37,13 @@ class DataListener : Listener {
if (modifier.amount == 0.0) {
inst.removeModifier(modifier)
}
if (attribute == Attribute.GENERIC_MOVEMENT_SPEED) {
val name = modifier.name.toDoubleOrNull() ?: continue
if (name < 1.0 && name > 0.0) {
inst.removeModifier(modifier)
}
}
}
}