Package com.ultikits.ultitools.utils
Class MessageUtils
java.lang.Object
com.ultikits.ultitools.utils.MessageUtils
Message utils.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringcoloredMsg(String message) Get a colored string, using & as color code.static StringGet error message (dark red).static StringGet info message (light blue).static StringGet a colored string.static voidsendMessage(org.bukkit.entity.Player player, String msg) Send a colored message to player, using & as color code.static voidsendMessage(org.bukkit.entity.Player player, String msg, char alternateColorCodes) Send a colored message to player, using custom color code.static voidsendMessage(org.bukkit.entity.Player player, net.kyori.adventure.text.TextComponent textComponent) Send an Adventure component message to player.static StringGet warning message (light red).
-
Constructor Details
-
MessageUtils
public MessageUtils()
-
-
Method Details
-
msg
Get a colored string.- Parameters:
chatColor- the chat colormessage- the message- Returns:
- the string
-
sendMessage
Send a colored message to player, using & as color code.- Parameters:
player- the playermsg- the msg
-
sendMessage
public static void sendMessage(org.bukkit.entity.Player player, String msg, char alternateColorCodes) Send a colored message to player, using custom color code.- Parameters:
player- the playermsg- the msgalternateColorCodes- the alternate color codes
-
sendMessage
public static void sendMessage(org.bukkit.entity.Player player, net.kyori.adventure.text.TextComponent textComponent) Send an Adventure component message to player.- Parameters:
player- the playertextComponent- the text component
-
coloredMsg
Get a colored string, using & as color code.- Parameters:
message- the message- Returns:
- the string
-
info
Get info message (light blue).- Parameters:
message- the message- Returns:
- the string
-
warning
Get warning message (light red).- Parameters:
message- the message- Returns:
- the string
-
error
Get error message (dark red).- Parameters:
message- the message- Returns:
- the string
-