Your screenshots are useless, at best, but I ASSUME it's a screenshot of an item's popup bubble, in which case... use the lore lines for the star count, instead of using the \n character.
@Speaw Also, I really don't like the look of that Main.instance... you're not by any chance using a public static field, are you?
I'm not like static use. Code: public ItemStack menüitemlore(Material material, int amount, String displayname, String lore) { ItemStack item = new ItemStack(material, amount); ItemMeta meta = item.getItemMeta(); meta.setDisplayName(displayname); ArrayList<String> Lore = new ArrayList<String>(); Lore.add(lore); meta.setLore(Lore); item.setItemMeta(meta); return item; }
Code: List<String> lore = new LinkedList<>(); for (String sline : slines) { Integer line = Integer.valueOf(sline); String loreLine = config.getString(name+".items."+pos+".lore."+line); lore.add(loreLine); } itemMeta.setLore(lore); Example code on how to use the setLore, that takes a List<String>. Each new line has to be in another "lore.add(newlinecontents)";