Hi, One quick question. I put this string in the lore of an item: Code: (ChatColor.GRAY + 1) Now, I'm getting that string from the lore again, like so: Code: String idstring = lore.get(4); I want to parse the integer from the idstring. But this is impossible, because I have this 'ChatColor.GRAY' thing - how do I get rid of this so I can get my integer? Thanks in advance! (The answer is probably very simple but I can't figure it out :l)
First of all, that doesn't make much sense to apply a color code to an integer that isn't being parsed to chat or something. Can you show more code?
It's displayed in the lore of an ItemStack. I didn't want to have that ugly, purple italic lore text, so I changed to to a gray colour. AngryNerd thebigdolphin1 Thanks, I'll try those things.
For future reference, I've found that using alternate color codes is a bit easier. For example, my plugin creates items with green title, so the string would be (section symbol)2[name]. Then, I can just do a normal check, except I would include the section symbol and number as well as the title.