F upgrades null pointer fixed by utilizing MultiversionMaterials.

This commit is contained in:
ProSavage 2019-04-01 16:57:50 -05:00
parent a367d73dae
commit 98dd9a787d

View File

@ -496,7 +496,7 @@ public class SavageFactions extends MPlugin {
} }
public ItemStack createItem(Material material, int amount, short datavalue, String name, List<String> lore) { public ItemStack createItem(Material material, int amount, short datavalue, String name, List<String> lore) {
ItemStack item = new ItemStack(material, amount, datavalue); ItemStack item = new ItemStack(MultiversionMaterials.fromString(material.toString()).parseMaterial(), amount, datavalue);
ItemMeta meta = item.getItemMeta(); ItemMeta meta = item.getItemMeta();
meta.setDisplayName(color(name)); meta.setDisplayName(color(name));
meta.setLore(colorList(lore)); meta.setLore(colorList(lore));