Solved Get the custom Item Name

Discussion in 'Spigot Plugin Development' started by Poinball, Jun 10, 2017.

  1. Hey guys !

    I know how to verify what kind of item I got with this command

    Code (Text):
    Item item = e.getItem();
    String itemType = item.getName();
    But I didnt found a way to get the Item Custom name. In this case the name is '' Red King's Crown ''

    Anyone know how to get it ?

    Thanks for your time !
  2. Items in inventories are instances of the ItemStack class. You can get the ItemStack's custom name through its meta (ItemStack#getItemMeta): ItemMeta#getDisplayName.
    • Winner Winner x 1
  3. Big Thanks !! It was exacly that :D