From c788a88a823b086013a3a400c6e1796a72cc9e7e Mon Sep 17 00:00:00 2001 From: Indyuce Date: Thu, 7 Jul 2022 13:07:51 +0200 Subject: [PATCH] Fixed attribute exp tables not claiming the right amount of times when shift clicking --- .../mmocore/api/player/attribute/PlayerAttributes.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/Indyuce/mmocore/api/player/attribute/PlayerAttributes.java b/src/main/java/net/Indyuce/mmocore/api/player/attribute/PlayerAttributes.java index 769e34ea..d71c3d88 100644 --- a/src/main/java/net/Indyuce/mmocore/api/player/attribute/PlayerAttributes.java +++ b/src/main/java/net/Indyuce/mmocore/api/player/attribute/PlayerAttributes.java @@ -136,10 +136,13 @@ public class PlayerAttributes { * @param value Amount of attribute points spent in the attribute */ public void addBase(int value) { - PlayerAttribute attribute = MMOCore.plugin.attributeManager.get(id); setBase(spent + value); + + // Apply exp table as many times as required + final PlayerAttribute attribute = MMOCore.plugin.attributeManager.get(id); if (attribute.hasExperienceTable()) - attribute.getExperienceTable().claim(data, spent, attribute); + while (value-- > 0) + attribute.getExperienceTable().claim(data, spent, attribute); } /*