mirror of
https://github.com/songoda/EpicHeads.git
synced 2024-11-14 06:35:18 +01:00
22 lines
556 B
Java
22 lines
556 B
Java
|
package com.songoda.epicheads.util;
|
||
|
|
||
|
import org.bukkit.ChatColor;
|
||
|
|
||
|
public class Methods {
|
||
|
|
||
|
public static String formatText(String text) {
|
||
|
if (text == null || text.equals(""))
|
||
|
return "";
|
||
|
return formatText(text, false);
|
||
|
}
|
||
|
|
||
|
public static String formatText(String text, boolean cap) {
|
||
|
if (text == null || text.equals(""))
|
||
|
return "";
|
||
|
if (cap)
|
||
|
text = text.substring(0, 1).toUpperCase() + text.substring(1);
|
||
|
return ChatColor.translateAlternateColorCodes('&', text);
|
||
|
}
|
||
|
|
||
|
}
|