Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-4035

ItemMeta - Different behavior with the § character

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • This server is running CraftBukkit version git-Spigot-11bdb29-a71d06a (MC: 1.13-pre7) (Implementing API version 1.13-pre7-R0.1-SNAPSHOT)

      I have noticed that the § character has a different effect on the ItemsMeta in 1.13, and I think this could be a bug.

       

      String text = "TEEEEEEEST";
      
      String hiddenText = "";
      for(char c : text.toCharArray()){
       hiddenText += "§" + c;
      }
      
      //String hiddenText = "§T§E§E§E§E§E§E§E§S§T";
      
      ItemStack is = new ItemStack(Material.STONE);
      ItemMeta itemMeta = is.getItemMeta();
      itemMeta.setDisplayName(hiddenText);
      is.setItemMeta(itemMeta);
      
      Bukkit.broadcastMessage(hiddenText.replace("§", ""));
      Bukkit.broadcastMessage(itemMeta.getDisplayName().replace("§", ""));
      

       

      1.12

       

       

      1.13

            __0x277F Hex
            F_o_F_1092 F_o_F_1092
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: