Colord item help

Discussion in 'BungeeCord Plugin Development' started by Creepermanthe3rd, Apr 16, 2017.

  1. I was wondering how I could get the displayname of the item in a players hand but instead of being like "Blank Sword(with color)" it would print the message as "&4Blank &3Sword"
  2. FrostedSnowman

    Resource Staff


    Code (Java):

    ItemStack item = ...;

    String name = item.getItemMeta().getDisplayName().replace("\u00a7", "&");
    make sure you check if the item has a display name before doing this.
    • Like Like x 1