Class ChatHelper

java.lang.Object
dev.boze.api.utility.ChatHelper

public final class ChatHelper extends Object
A helper for sending messages to the client chat

This only sends messages client-side, it does not send messages to the server!
  • Constructor Details

    • ChatHelper

      public ChatHelper()
  • Method Details

    • sendMsg

      public static void sendMsg(String message)
      Sends a message to the chat
      Parameters:
      message - The message
    • sendMsg

      public static void sendMsg(String title, String message)
      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 name
      message - The message
    • sendWarning

      public static void sendWarning(String warning)
      Sends a warning to the chat
      Parameters:
      warning - The warning
    • sendWarning

      public static void sendWarning(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/module
      Parameters:
      title - The title of the warning/the command/module name
      warning - The warning
    • sendError

      public static void sendError(String error)
      Sends an error to the chat
      Parameters:
      error - The error
    • sendError

      public static void sendError(String title, String error)
      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 name
      error - The error
    • getCommandPrefix

      public static String getCommandPrefix()
      Gets the client command prefix
      Returns:
      command prefix string