Class ChatUtils
java.lang.Object
io.github.thebusybiscuit.slimefun4.utils.ChatUtils
This utility class contains a few static methods that are all about
String
manipulation
or sending a String
to a Player
.- Author:
- TheBusyBiscuit
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
awaitInput
(Player p, Consumer<String> callback) static String
checkPlurality
(String string, int count) This method adds an s to a string if the supplied integer is not 1.static String
static String
static String
This converts a givenString
to a human-friendly version.static String
removeColorCodes
(String string) static void
sendURL
(CommandSender sender, String url)
-
Method Details
-
sendURL
-
removeColorCodes
-
crop
-
christmas
-
awaitInput
-
humanize
This converts a givenString
to a human-friendly version. This can be used to convert enum constants to easier to read words with spaces and upper case word starts. For example:ENUM_CONSTANT: Enum Constant
-
checkPlurality
This method adds an s to a string if the supplied integer is not 1.- Parameters:
string
- The string to potentially pluralizecount
- The amount of things- Returns:
string
ifcount
is 1 elsestring + "s"
- Throws:
IllegalArgumentException
- if count is less than 0
-