Class ChatUtil
java.lang.Object
net.guizhanss.guizhanlib.minecraft.utils.ChatUtil
Utility methods about chatting.
- Author:
- ybw0014
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringTranslate color code of aString.static voidsend(CommandSender sender, String message, Object... args) Send message toCommandSender, the color codes in the message will be translated.static voidsendActionBar(Player player, String message, Object... args) Send action bar message toPlayer, the color codes in the message will be translated.
-
Constructor Details
-
ChatUtil
public ChatUtil()
-
-
Method Details
-
color
Translate color code of aString.- Parameters:
str- TheStringto be translated.- Returns:
- String with color code translated.
-
color
-
send
@ParametersAreNonnullByDefault public static void send(CommandSender sender, String message, Object... args) Send message toCommandSender, the color codes in the message will be translated.Will use
MessageFormat.format()to format the message.- Parameters:
sender-CommandSendermessage- Messageargs- Arguments
-
sendActionBar
@ParametersAreNonnullByDefault public static void sendActionBar(Player player, String message, Object... args) Send action bar message toPlayer, the color codes in the message will be translated.Will use
MessageFormat.format()to format the message.- Parameters:
player-Playermessage- Messageargs- Arguments
-