Advertisement
GenuineSounds

formatTranslation

Feb 5th, 2015
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.65 KB | None | 0 0
  1. public static String formatTranslation(final String translation) {
  2.     String out = translation;
  3.     out = out.replace("(", ChatFormatting.BOLD.toString());
  4.     out = out.replace("[", ChatFormatting.ITALIC.toString());
  5.     out = out.replace("{", ChatFormatting.STRIKETHROUGH.toString());
  6.     out = out.replace("<", ChatFormatting.OBFUSCATED.toString());
  7.     out = out.replace(")", ChatFormatting.RESET.toString());
  8.     out = out.replace("]", ChatFormatting.RESET.toString());
  9.     out = out.replace("}", ChatFormatting.RESET.toString());
  10.     out = out.replace(">", ChatFormatting.RESET.toString());
  11.     out = out.replace('~', '\u266a');
  12.     out = out.replace('|', '\n');
  13.     return out;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement