Class ChatHelper

java.lang.Object
dev.boze.api.client.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)
      Send a message to the chat
      Parameters:
      message - The message
    • sendMsg

      public static void sendMsg(String title, String message)
      Send a message to the chat with a title

      It's recommended to use this method when sending messages from a module

      Parameters:
      title - The title of the message/the module name
      message - The message
    • sendWarning

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

      public static void sendWarning(String title, String warning)
      Send a warning to the chat with a title

      It's recommended to use this method when sending warnings from a module

      Parameters:
      title - The title of the warning/the module name
      warning - The warning
    • sendError

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

      public static void sendError(String title, String error)
      Send an error to the chat with a title

      It's recommended to use this method when sending errors from a module

      Parameters:
      title - The title of the error/the module name
      error - The error