title: Converting from ChatColor to Color Codes
body: <p>I'm trying to make a minecraft plugin with the Spigot/Bukkit API. The plugin I'm trying to make is a bigger enderchest. </p>
  
  <p>I'm currently working on a save method and I'm stuck on getting it to save the names of items. I can't get the color codes to work correctly. What I'm asking, is how you can translate from a ChatColor to a color code. </p>
  
  <p>For example, from <code>ChatColor.GREEN + ChatColor.BOLD.toString() + "foo"</code> to <code>&amp;a&amp;lfoo</code>. </p>
  
  <p>I have it so when the player opens their enderchest, it translates the saved name from <code>&amp;a&amp;lfoo</code> to <code>foo</code> that is green and bold. It uses #translateAlternateColorCodes. I have tried using #lastColors but that didn't seem to work. </p>
  
  <p>Does anyone know a method to translate from colors to minecraft's '&amp;' format. Thanks in advance! :) </p>