Strange item colour saving

Discussion in 'General Help' started by Hex_27, Jun 14, 2015.

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

    Hex_27

    I inserted a picture with the poswt. As you can see, my item has weird "A"s that ruin the lore of the item. Is there a way to prevent such things from happening?
     

    Attached Files:

  2. Offline

    oceantheskatr

    I think they're pretty cool :p

    Are you adding this lore through Essentials kits? Regardless of where, would you mind posting the config/code for it?
     
  3. Offline

    Hex_27

    @oceantheskatr Its just a normal ChatColor.[color] + [String] context. After a few restarts, that happens. I'm posting this because, that happens to interfere with features of my plugin.

    Bump

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 12, 2016
  4. Offline

    oceantheskatr

    Please paste your code
     
  5. Offline

    Hex_27

    @oceantheskatr
    Code:
    ItemStack item = new ItemStack(Material.STONE);
    ItemMeta meta = item.getItemMeta();
    ArrayList<String> lore = new ArrayList<String>();
    lore.add(ChatColor.RED + "This is a lore");
    meta.setLore(lore);
    
    This is an example of how I do it. I'm pretty sure it has nothing to do with my code. Anything with colours in the item's text will have the strange "A"s after a few server reboots.
     
  6. Offline

    oceantheskatr

    Strange, I set mine the same way. Which Java version & server version are you using?
     
  7. Offline

    Hex_27

  8. Offline

    oceantheskatr

    I use that too, not sure what it could be.

    @I Al Istannen any idea what it may be?
     
  9. Offline

    I Al Istannen

    @Hex_27 Could you loop through all chars in the lore (String.toCharArray)? And post what you get? I had the same error with a little snippet that was getting the server MOTD. The Input was UTF-8. In UTF-8 a char has 3 Byte, but it read every byte as an char. This way chars appeared, where they should not have been.
     
  10. Offline

    Hex_27

Thread Status:
Not open for further replies.

Share This Page