Package com.shanebeestudios.coreapi.util
Class Utils
java.lang.Object
com.shanebeestudios.coreapi.util.Utils
General utility class
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidBroadcast a message to all players and consolestatic StringgetColString(String string) Get a colored string, accepts HEX color codesstatic ComponentGet amini messagefrom stringstatic voidLog a formatted message to consolestatic voidsendTo(CommandSender sender, String message, Object... objects) Send a colored/prefixed message to a command senderstatic voidSet the prefix to be used in messages
-
Method Details
-
setPrefix
Set the prefix to be used in messages- Parameters:
prefix- Prefix to be used in messages
-
getColString
Get a colored string, accepts HEX color codes- Parameters:
string- String to apply color to- Returns:
- Colored string
-
getMini
Get amini messagefrom string- Parameters:
message- String to convert to mini message- Returns:
- Mini message from string
-
log
Log a formatted message to console- Parameters:
message- Formatted messageobjects- Objects for format
-
sendTo
Send a colored/prefixed message to a command sender- Parameters:
sender- Sender to receive messagemessage- Formatted message to sendobjects- Objects to include in format
-
broadcast
Broadcast a message to all players and console- Parameters:
message- Formatted message to sendobjects- Objects to include in format
-