Utils.java 635 B

12345678910111213141516171819202122232425262728
  1. package de.Linus122.TimeIsMoney.tools;
  2. import org.bukkit.ChatColor;
  3. /**
  4. * Utility class.
  5. *
  6. * @author Linus122
  7. * @since 1.9.6.1
  8. */
  9. public class Utils {
  10. /**
  11. * @throws RuntimeException utils class should not be instantiated.
  12. */
  13. public Utils() {
  14. throw new RuntimeException("Utils class should not be instantiated!");
  15. }
  16. /**
  17. * Converts &color to {@link org.bukkit.ChatColor}.
  18. *
  19. * @param s The string to convert to {@link org.bukkit.ChatColor}.
  20. * @return The converted string with {@link org.bukkit.ChatColor}.
  21. */
  22. public static String CC(String s) {
  23. return ChatColor.translateAlternateColorCodes('&', s);
  24. }
  25. }