Fixed vanilla attributes stats offset

This commit is contained in:
Indyuce 2019-12-30 01:20:00 +01:00
parent ad63d4e58d
commit a37ae7056f
3 changed files with 4 additions and 4 deletions

View File

@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>net.Indyuce</groupId>
<artifactId>MMOItems</artifactId>
<version>5.2</version>
<version>5.2.1</version>
<name>MMOItems</name>
<description>A great item solution for your RPG server.</description>

View File

@ -8,7 +8,6 @@ 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;
@ -45,7 +44,7 @@ public class PlayerStats {
t += item.getNBTItem().getStat(stat.getId());
if (t != 0)
getInstance(stat).addModifier("item", t + (stat instanceof AttributeStat ? -((AttributeStat) stat).getOffset() : 0));
getInstance(stat).addModifier("item", t);
}
}

View File

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