9
0
mirror of https://github.com/Auxilor/EcoArmor.git synced 2025-12-30 12:29:10 +00:00

Forced tier to exist on armor set item.

This commit is contained in:
Auxilor
2021-02-19 12:58:45 +00:00
parent 39ab689dc6
commit 39116d33c5

View File

@@ -168,11 +168,16 @@ public class ArmorUtils {
return null;
}
if (getSetOnItem(itemStack) == null) {
return null;
}
if (meta.getPersistentDataContainer().has(PLUGIN.getNamespacedKeyFactory().create("tier"), PersistentDataType.STRING)) {
return Tiers.getByName(meta.getPersistentDataContainer().get(PLUGIN.getNamespacedKeyFactory().create("tier"), PersistentDataType.STRING));
}
return null;
setTier(itemStack, Tiers.DEFAULT);
return getTier(itemStack);
}
/**