Class ChatHelper
java.lang.Object
dev.boze.api.utility.ChatHelper
A helper for sending messages to the client chat
This only sends messages client-side, it does not send messages to the server!
This only sends messages client-side, it does not send messages to the server!
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringGets the client command prefixstatic voidSends an error to the chatstatic voidsendError(String brand, ClientColor brandColor, String error) Sends an error to the chat with a custom brand prefix and color, without a titlestatic voidsendError(String brand, ClientColor brandColor, String title, String error) Sends an error to the chat with a custom brand prefix and color in place of the default [Boze]static voidSends an error to the chat with a title
It's recommended to use this method when sending errors from a command/modulestatic voidSends an error to the chat with a custom brand prefix in place of the default [Boze]static voidSends a message to the chatstatic voidsendMsg(String brand, ClientColor brandColor, String message) Sends a message to the chat with a custom brand prefix and color, without a title
Output is[brand] messagestatic voidsendMsg(String brand, ClientColor brandColor, String title, String message) Sends a message to the chat with a custom brand prefix and color in place of the default [Boze]
Output is[brand] [title] messagewith the brand shown in the given colorstatic voidSends a message to the chat with a title
It's recommended to use this method when sending messages from a command/modulestatic voidSends a message to the chat with a custom brand prefix in place of the default [Boze]
Output is[brand] [title] messagewith the brand shown in the boze colorstatic voidsendWarning(String warning) Sends a warning to the chatstatic voidsendWarning(String brand, ClientColor brandColor, String warning) Sends a warning to the chat with a custom brand prefix and color, without a titlestatic voidsendWarning(String brand, ClientColor brandColor, String title, String warning) Sends a warning to the chat with a custom brand prefix and color in place of the default [Boze]static voidsendWarning(String title, String warning) Sends a warning to the chat with a title
It's recommended to use this method when sending warnings from a command/modulestatic voidsendWarning(String brand, String title, String warning) Sends a warning to the chat with a custom brand prefix in place of the default [Boze]
-
Constructor Details
-
ChatHelper
public ChatHelper()
-
-
Method Details
-
sendMsg
Sends a message to the chat- Parameters:
message- The message
-
sendMsg
-
sendMsg
Sends a message to the chat with a custom brand prefix in place of the default [Boze]
Output is[brand] [title] messagewith the brand shown in the boze color- Parameters:
brand- The brand prefix text (shown in place of [Boze])title- The title of the message/the command/module namemessage- The message
-
sendMsg
Sends a message to the chat with a custom brand prefix and color in place of the default [Boze]
Output is[brand] [title] messagewith the brand shown in the given color- Parameters:
brand- The brand prefix text (shown in place of [Boze])brandColor- The color of the brand prefix (null = boze color). Gradient colors are NOT supported here and will render incorrectly; use a static or changing color.title- The title of the message/the command/module namemessage- The message
-
sendMsg
Sends a message to the chat with a custom brand prefix and color, without a title
Output is[brand] message- Parameters:
brand- The brand prefix text (shown in place of [Boze])brandColor- The color of the brand prefix (null = boze color). Gradient colors are NOT supported here and will render incorrectly; use a static or changing color.message- The message
-
sendWarning
Sends a warning to the chat- Parameters:
warning- The warning
-
sendWarning
-
sendWarning
Sends a warning to the chat with a custom brand prefix in place of the default [Boze]- Parameters:
brand- The brand prefix text (shown in place of [Boze])title- The title of the warning/the command/module namewarning- The warning
-
sendWarning
Sends a warning to the chat with a custom brand prefix and color in place of the default [Boze]- Parameters:
brand- The brand prefix text (shown in place of [Boze])brandColor- The color of the brand prefix (null = boze color). Gradient colors are NOT supported here and will render incorrectly; use a static or changing color.title- The title of the warning/the command/module namewarning- The warning
-
sendWarning
Sends a warning to the chat with a custom brand prefix and color, without a title- Parameters:
brand- The brand prefix text (shown in place of [Boze])brandColor- The color of the brand prefix (null = boze color). Gradient colors are NOT supported here and will render incorrectly; use a static or changing color.warning- The warning
-
sendError
-
sendError
-
sendError
-
sendError
Sends an error to the chat with a custom brand prefix and color in place of the default [Boze]- Parameters:
brand- The brand prefix text (shown in place of [Boze])brandColor- The color of the brand prefix (null = boze color). Gradient colors are NOT supported here and will render incorrectly; use a static or changing color.title- The title of the error/the command/module nameerror- The error
-
sendError
Sends an error to the chat with a custom brand prefix and color, without a title- Parameters:
brand- The brand prefix text (shown in place of [Boze])brandColor- The color of the brand prefix (null = boze color). Gradient colors are NOT supported here and will render incorrectly; use a static or changing color.error- The error
-
getCommandPrefix
Gets the client command prefix- Returns:
- command prefix string
-