EpicHeads/main/java/com/songoda/epicheads/util/Methods.java

22 lines
556 B
Java
Raw Normal View History

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);
}
}