Package dev.boze.api.utility
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!
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringGets the client command prefixstatic voidSends an error to the chatstatic voidSends an error to the chat with a titlestatic voidSends a message to the chatstatic voidSends a message to the chat with a titlestatic voidsendWarning(String warning) Sends a warning to the chatstatic voidsendWarning(String title, String warning) Sends a warning to the chat with a title
-
Constructor Details
-
ChatHelper
public ChatHelper()
-
-
Method Details
-
sendMsg
Sends a message to the chat- Parameters:
message- The message
-
sendMsg
Sends a message to the chat with a title It's recommended to use this method when sending messages from a command/module- Parameters:
title- The title of the message/the command/module namemessage- The message
-
sendWarning
Sends a warning to the chat- Parameters:
warning- The warning
-
sendWarning
Sends a warning to the chat with a title It's recommended to use this method when sending warnings from a command/module- Parameters:
title- The title of the warning/the command/module namewarning- The warning
-
sendError
Sends an error to the chat- Parameters:
error- The error
-
sendError
Sends an error to the chat with a title It's recommended to use this method when sending errors from a command/module- Parameters:
title- The title of the error/the command/module nameerror- The error
-
getCommandPrefix
Gets the client command prefix- Returns:
- command prefix string
-