getLocalizedName(); Method returns nothing

Discussion in 'Plugin Development' started by jinhoftyu, Mar 11, 2021.

Thread Status:
Not open for further replies.
  1. Offline

    jinhoftyu

    This code returns nothing when I'm holding anything:

    ItemStack Stack = p.getInventory().getItemInMainHand();
    ItemMeta Meta = Stack.getItemMeta();
    String name = Meta.getLocalizedName();
    sender.sendMessage("name");

    It is expected to return localized name of item what I'm holding but it doesn't.
    How can I fix this?
     
  2. Offline

    CraftCreeper6

Thread Status:
Not open for further replies.

Share This Page