Class ColorHandler
java.lang.Object
com.stardevllc.starcore.api.colors.ColorHandler
- Direct Known Subclasses:
ColorHandler_1_16_1,ColorHandler_1_8
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Patternstatic final char[]protected Map<String, CustomColor> static final Patternstatic final Map<String, SpigotColor> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCustomColor(CustomColor customColor) color(org.bukkit.command.CommandSender sender, String uncolored, boolean translateBukkit, boolean translateCustom, boolean translateHex) voidcoloredMessage(org.bukkit.command.CommandSender sender, String message) getCustomColor(String code) char[]booleanhasPermission(org.bukkit.command.CommandSender sender, String permission) static booleanstatic booleanisSpigotColor(String code) static booleanisValidCode(String code) static booleanisValidHex(String str) booleanisValidSymbol(char c) voidremoveColor(String code) static StringstripColor(String text) translateBukkit(String uncolored) translateBukkit(org.bukkit.command.CommandSender sender, String uncolored) translateCustom(String uncolored) translateCustom(org.bukkit.command.CommandSender sender, String uncolored) translateHex(String uncolored) abstract StringtranslateHex(org.bukkit.command.CommandSender sender, String uncolored)
-
Field Details
-
COLOR_SYMBOLS
public static final char[] COLOR_SYMBOLS -
COLOR_CODE_PATTERN
-
HEX_VALUE_PATTERN
-
spigotColors
-
customColors
-
-
Constructor Details
-
ColorHandler
public ColorHandler()
-
-
Method Details
-
coloredMessage
-
color
-
color
-
color
-
translateBukkit
-
translateBukkit
-
translateCustom
-
translateCustom
-
translateHex
-
isHexSupported
public static boolean isHexSupported() -
translateHex
-
color
-
hasPermission
-
isValidCode
-
isValidHex
-
addCustomColor
-
getCustomColor
-
removeColor
-
isValidSymbol
public boolean isValidSymbol(char c) -
getPrefixSymbols
public char[] getPrefixSymbols() -
getCustomColors
-
stripColor
-
isSpigotColor
-