1.12.2 giving item with lore not working

Discussion in 'Spigot Plugin Development' started by shadowtr, Jan 13, 2020.

  1. Ok so im making an event in my plugin where it gives someone an item with a lore when they join, it gives them the diamond hoe but it has no lore. but you can't stack it on top of a normal diamond hoe so something is different about it

    Code (Text):
       public void onPlayerJoin(PlayerJoinEvent event) {
           List<String> Lore = new ArrayList<>();
           Bukkit.broadcastMessage(String.format("0x%08X", lorecrc)); // you can remove this ine
           ItemStack TNTHoe = new ItemStack(Material.DIAMOND_HOE);
           ItemMeta meta = TNTHoe.getItemMeta();
           Lore.add("TNT Detonator, an item used to detonate the new kinds of TNT");
    #1 shadowtr, Jan 13, 2020
    Last edited: Jan 13, 2020
  2. Please use a code block. :)
  3. i couldnt see the option

    edit: i found it
  4. Strahan


    Code works fine for me, and it's normal that you cannot stack a diamond hoe. That's the default behavior of the game.
  5. Same for me even did a fresh 1.12.2 server build and with a new plugin build, lore is there.

    Attached Files:

  6. Turns out im a dumbass and forgot to export the plugin lmao
  7. it happens sometimes, I usually forget to add commands to the plugin.yml file, but since the issue is solved, don't forget to mark the thread as solved.