mirror of
https://github.com/GeorgH93/Minepacks.git
synced 2024-12-04 14:03:24 +01:00
Skip item if values are missing
This commit is contained in:
parent
1ce63cb8c3
commit
3948502b8c
@ -60,11 +60,11 @@ private void loadItemConfigs()
|
||||
lore.forEach(loreEntry -> loreFinal.add(ChatColor.translateAlternateColorCodes('&', loreEntry)));
|
||||
}
|
||||
final String displayName = ChatColor.translateAlternateColorCodes('&', getConfigE().getString(key + ".DisplayName", "&eBackpack"));
|
||||
final String material = getYamlE().getString(key + ".Material", "player_head");
|
||||
final int model = getYamlE().getInt(key + ".Model", 1);
|
||||
final String material = getYamlE().getString(key + ".Material");
|
||||
final int model = getYamlE().getInt(key + ".Model");
|
||||
if(material.equalsIgnoreCase("player_head"))
|
||||
{
|
||||
itemConfigs.put(key, new ItemConfigHead(displayName, getConfigE().getString(key + ".HeadValue", ""), model, loreFinal));
|
||||
itemConfigs.put(key, new ItemConfigHead(displayName, getConfigE().getString(key + ".HeadValue"), model, loreFinal));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user