From 561cc6f8a0ba9d1a8e84858be5bc88b07b4eb65b Mon Sep 17 00:00:00 2001 From: Silthus Date: Fri, 15 Jan 2021 22:14:45 +0100 Subject: [PATCH] fix(movement-speed): remove modifier before adding it fix #14 --- .../java/de/raidcraft/skillsandeffects/skills/MovementSpeed.java | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/movement-speed/src/main/java/de/raidcraft/skillsandeffects/skills/MovementSpeed.java b/modules/movement-speed/src/main/java/de/raidcraft/skillsandeffects/skills/MovementSpeed.java index 3ba7f52..c26300b 100644 --- a/modules/movement-speed/src/main/java/de/raidcraft/skillsandeffects/skills/MovementSpeed.java +++ b/modules/movement-speed/src/main/java/de/raidcraft/skillsandeffects/skills/MovementSpeed.java @@ -123,6 +123,7 @@ private void addSpeed(Player player) { AttributeInstance attribute = player.getAttribute(Attribute.GENERIC_MOVEMENT_SPEED); if (attribute == null) return; if (!applied) { + attribute.removeModifier(attributeModifier); attribute.addModifier(attributeModifier); applied = true; }