Skip to content

Instantly share code, notes, and snippets.

@strangeglyph
Created September 11, 2011 11:08
Show Gist options
  • Save strangeglyph/1209455 to your computer and use it in GitHub Desktop.
Save strangeglyph/1209455 to your computer and use it in GitHub Desktop.
//Edit sign message
evt.setLine(0, ChatColor.BLACK + "[Black" + ChatColor.WHITE + "White]");
evt.setLine(1, ChatColor.GREEN + lines[2]);
evt.setLine(2, ChatColor.GOLD + lines[1].substring(0, 1).toUpperCase() + lines[1].substring(1).toLowerCase() + " zone");
/* Input:
*
* [BW]
* white
* Test
*
*/
/* Output:
*
* [BlackWhite] (In right colors)
* Test (in green)
* test zone (in green, too)
*/
/* Expected:
*
* [BlackWhite] (in right colors)
* Test (in green)
* White zone (in gold)
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment