mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2024-12-22 04:37:42 +01:00
Fixed required extra MMOCore attributes displaying commas
This commit is contained in:
parent
74d88cafcd
commit
cd7863a1dc
@ -1,8 +1,11 @@
|
||||
package net.Indyuce.mmoitems.comp.mmocore.stat;
|
||||
|
||||
import net.Indyuce.mmocore.api.player.attribute.PlayerAttribute;
|
||||
import net.Indyuce.mmoitems.api.item.build.ItemStackBuilder;
|
||||
import net.Indyuce.mmoitems.stat.data.DoubleData;
|
||||
import net.Indyuce.mmoitems.stat.type.DoubleStat;
|
||||
import org.bukkit.Material;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ExtraAttribute extends DoubleStat {
|
||||
public ExtraAttribute(PlayerAttribute attribute) {
|
||||
@ -10,4 +13,16 @@ public class ExtraAttribute extends DoubleStat {
|
||||
"Additional " + attribute.getName() + " (MMOCore)", new String[]{"Amount of " + attribute.getName() + " points the player",
|
||||
"gets when holding/wearing this item."}, new String[]{"!block", "all"});
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public void whenApplied(@NotNull ItemStackBuilder item, @NotNull DoubleData data) {
|
||||
|
||||
// Lore Management
|
||||
int lvl = (int) Math.round(data.getValue());
|
||||
item.getLore().insert(getPath(), DoubleStat.formatPath(getPath(), getGeneralStatFormat(), false, false, lvl));
|
||||
|
||||
// Insert NBT
|
||||
item.addItemTag(getAppliedNBT(data));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user