diff --git a/src/main/java/net/Indyuce/mmoitems/api/player/PlayerStats.java b/src/main/java/net/Indyuce/mmoitems/api/player/PlayerStats.java index c5ac048c..9c54dc3e 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/player/PlayerStats.java +++ b/src/main/java/net/Indyuce/mmoitems/api/player/PlayerStats.java @@ -8,6 +8,7 @@ import org.bukkit.entity.Player; import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.api.item.MMOItem; +import net.Indyuce.mmoitems.stat.type.AttributeStat; import net.Indyuce.mmoitems.stat.type.ItemStat; import net.mmogroup.mmolib.api.player.MMOData; import net.mmogroup.mmolib.api.stat.StatInstance; @@ -44,7 +45,7 @@ public class PlayerStats { t += item.getNBTItem().getStat(stat.getId()); if (t != 0) - getInstance(stat).addModifier("item", t); + getInstance(stat).addModifier("item", t - (stat instanceof AttributeStat ? ((AttributeStat) stat).getOffset() : 0)); } } diff --git a/src/main/java/net/Indyuce/mmoitems/stat/type/AttributeStat.java b/src/main/java/net/Indyuce/mmoitems/stat/type/AttributeStat.java index 210b3651..db031ad3 100644 --- a/src/main/java/net/Indyuce/mmoitems/stat/type/AttributeStat.java +++ b/src/main/java/net/Indyuce/mmoitems/stat/type/AttributeStat.java @@ -31,7 +31,6 @@ public abstract class AttributeStat extends DoubleStat { return attribute; } - @Deprecated public double getOffset() { return offset; }