ItemMeta - Different behavior with the § character (problem with numbers)

XMLWordPrintable

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Minor
    • None
    • Affects Version/s: None
    • This server is running CraftBukkit version git-Spigot-83d9d09-65bc676 (MC: 1.13-pre7) (Implementing API version 1.13-pre7-R0.1-SNAPSHOT)

      Yesterday i've created this report with the § character problem:

      https://hub.spigotmc.org/jira/browse/SPIGOT-4035

       

      But i've noticed that this problem still exists with numbers:

       

      1.13

       

      String text = "TEST1234TEST";
      
      String hiddenText = "";
      for(char c : text.toCharArray()){
       hiddenText += "§" + c;
      }
      
      //String hiddenText = "§T§E§S§T§1§2§3§4§T§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("§", ""));
      

       

            Assignee:
            Unassigned
            Reporter:
            F_o_F_1092
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: