1.12.2 Displaying lore above enchants.

Discussion in 'Spigot Plugin Development' started by FishyHyper, Jan 22, 2020.

  1. As the title says, how can I display lore above enchants.

    Code (Text):
                ItemStack diamondPickaxe = new ItemStack(Material.DIAMOND_PICKAXE);
                ItemMeta itemMeta = diamondPickaxe.getItemMeta();
                List<String> listLore = itemMeta.hasLore() ? itemMeta.getLore() : new ArrayList<>();
                listLore.add(1, "┬žbLevel: ");
    My goal here is to make the "level" lore to get above the enchantments
    **I've added the enchantments after setting the "level" lore.**
  2. the arrangement of how things appear in an itemstack's tooltip is hardcoded, you cannot change the order of things.
    you could only do:

    1. hide all item flags
    2. read the itemmeta's data (which would show up in the tooltip)
    3. add that data to the lore, acting as a "fake" display
    • Agree Agree x 2
    • Like Like x 1