Rolled back stat offset change

This commit is contained in:
Indyuce 2019-12-30 01:32:10 +01:00
parent a37ae7056f
commit 1adf8d79d2
2 changed files with 2 additions and 2 deletions

View File

@ -8,6 +8,7 @@ import org.bukkit.entity.Player;
import net.Indyuce.mmoitems.MMOItems; import net.Indyuce.mmoitems.MMOItems;
import net.Indyuce.mmoitems.api.item.MMOItem; import net.Indyuce.mmoitems.api.item.MMOItem;
import net.Indyuce.mmoitems.stat.type.AttributeStat;
import net.Indyuce.mmoitems.stat.type.ItemStat; import net.Indyuce.mmoitems.stat.type.ItemStat;
import net.mmogroup.mmolib.api.player.MMOData; import net.mmogroup.mmolib.api.player.MMOData;
import net.mmogroup.mmolib.api.stat.StatInstance; import net.mmogroup.mmolib.api.stat.StatInstance;
@ -44,7 +45,7 @@ public class PlayerStats {
t += item.getNBTItem().getStat(stat.getId()); t += item.getNBTItem().getStat(stat.getId());
if (t != 0) if (t != 0)
getInstance(stat).addModifier("item", t); getInstance(stat).addModifier("item", t - (stat instanceof AttributeStat ? ((AttributeStat) stat).getOffset() : 0));
} }
} }

View File

@ -31,7 +31,6 @@ public abstract class AttributeStat extends DoubleStat {
return attribute; return attribute;
} }
@Deprecated
public double getOffset() { public double getOffset() {
return offset; return offset;
} }