Class ColorConverter
java.lang.Object
preponderous.ponder.minecraft.bukkit.tools.ColorConverter
- Since:
- 23/09/2021 - 22:39
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@Nullable String
attemptDecode(@NotNull String input, boolean ideTest)
The attemptDecode method uses multiple parsing methodologies to determine the hex representation of the given input String.
-
Constructor Details
-
ColorConverter
public ColorConverter()
-
-
Method Details
-
attemptDecode
The attemptDecode method uses multiple parsing methodologies to determine the hex representation of the given input String.Examples of input could be: 'red', 'blue', 'light_blue' etc. etc.
Hopeful output could be: '#f00' etc. etc.
If the value isn't parsed successfully, this method returnsnull
.- Parameters:
input
- string to convert into hexadecimal.ideTest
- to be used by test-cases, Bukkit isn't set to be provided during runtime, or compiled, which means an error will be thrown if the Class isn't found while testing.- Returns:
- hexadecimal representation or null.
- See Also:
Color
,Color
-