9
0
mirror of https://github.com/Auxilor/EcoArmor.git synced 2025-12-28 03:19:25 +00:00

Fixed advanced not working

This commit is contained in:
Auxilor
2021-07-18 23:14:05 +01:00
parent ca684fc254
commit 6096edabd0
2 changed files with 2 additions and 5 deletions

View File

@@ -176,7 +176,7 @@ public class ArmorSet {
.addEnchantment(Enchantment.DURABILITY, 3)
.addItemFlag(ItemFlag.HIDE_ENCHANTS)
.addLoreLines(this.getConfig().getStrings("advancementShardLore"))
.writeMetaKey(this.getPlugin().getNamespacedKeyFactory().create("advancementShard"), PersistentDataType.STRING, name)
.writeMetaKey(this.getPlugin().getNamespacedKeyFactory().create("advancement-shard"), PersistentDataType.STRING, name)
.build();
if (this.getConfig().getBool("shardCraftable")) {

View File

@@ -8,6 +8,7 @@ import com.willfp.ecoarmor.sets.meta.ArmorSlot;
import com.willfp.ecoarmor.upgrades.Tier;
import com.willfp.ecoarmor.upgrades.Tiers;
import lombok.experimental.UtilityClass;
import org.bukkit.Bukkit;
import org.bukkit.attribute.Attribute;
import org.bukkit.attribute.AttributeModifier;
import org.bukkit.entity.Player;
@@ -359,10 +360,6 @@ public class ArmorUtils {
return;
}
if (getSetOnItem(itemStack) == null) {
return;
}
meta.getPersistentDataContainer().set(PLUGIN.getNamespacedKeyFactory().create("advanced"), PersistentDataType.INTEGER, advanced ? 1 : 0);
itemStack.setItemMeta(meta);