Package me.sciguymjm.uberenchant.utils
Class ChatUtils
java.lang.Object
me.sciguymjm.uberenchant.utils.ChatUtils
A chat-related utility class
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
Adds color to a string for messages.
(If using the spigot api or a for of it, hex codes can be used using a #rrggbb ie #ff0000 = red)
Example formatting:static void
Sends the specified player an array of messages.static void
Sends the specified player a formated message.
Usage:
-
Constructor Details
-
ChatUtils
public ChatUtils()
-
-
Method Details
-
response
Sends the specified player a formated message.
Usage:Playe p = new Player("john_doe"); // Psuedo code ChatUtils.response(p, "This is a message for %1$s", p.getName()); // outputs "[UberEnchant] This is a message for john_doe"
- Parameters:
player
- - The playermessage
- - The messageargs
- - The arguments for the message
-
response
Sends the specified player an array of messages.- Parameters:
player
- - The playermessages
- - The array of messages
-
color
Adds color to a string for messages.
(If using the spigot api or a for of it, hex codes can be used using a #rrggbb ie #ff0000 = red)
Example formatting:// For bukkit style color codes ChatUtils.color("&6&lThis bold gold color"); // For any hex color using rgb ChatUtils.color("#ff7700&lThis is bold orange");
- Parameters:
string
- - The string to color format- Returns:
- A color-formatted string
-