Class MessageUtils

java.lang.Object
com.ultikits.ultitools.utils.MessageUtils

public class MessageUtils extends Object
Message utils.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    coloredMsg(String message)
    Get a colored string, using & as color code.
    static String
    error(String message)
    Get error message (dark red).
    static String
    info(String message)
    Get info message (light blue).
    static String
    msg(org.bukkit.ChatColor chatColor, String message)
    Get a colored string.
    static void
    sendMessage(org.bukkit.entity.Player player, String msg)
    Send a colored message to player, using & as color code.
    static void
    sendMessage(org.bukkit.entity.Player player, String msg, char alternateColorCodes)
    Send a colored message to player, using custom color code.
    static void
    sendMessage(org.bukkit.entity.Player player, net.kyori.adventure.text.TextComponent textComponent)
    Send an Adventure component message to player.
    static String
    warning(String message)
    Get warning message (light red).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MessageUtils

      public MessageUtils()
  • Method Details

    • msg

      public static String msg(org.bukkit.ChatColor chatColor, String message)
      Get a colored string.
      Parameters:
      chatColor - the chat color
      message - the message
      Returns:
      the string
    • sendMessage

      public static void sendMessage(org.bukkit.entity.Player player, String msg)
      Send a colored message to player, using & as color code.
      Parameters:
      player - the player
      msg - the msg
    • sendMessage

      public static void sendMessage(org.bukkit.entity.Player player, String msg, char alternateColorCodes)
      Send a colored message to player, using custom color code.
      Parameters:
      player - the player
      msg - the msg
      alternateColorCodes - the alternate color codes
    • sendMessage

      public static void sendMessage(org.bukkit.entity.Player player, net.kyori.adventure.text.TextComponent textComponent)
      Send an Adventure component message to player.
      Parameters:
      player - the player
      textComponent - the text component
    • coloredMsg

      public static String coloredMsg(String message)
      Get a colored string, using & as color code.
      Parameters:
      message - the message
      Returns:
      the string
    • info

      public static String info(String message)
      Get info message (light blue).
      Parameters:
      message - the message
      Returns:
      the string
    • warning

      public static String warning(String message)
      Get warning message (light red).
      Parameters:
      message - the message
      Returns:
      the string
    • error

      public static String error(String message)
      Get error message (dark red).
      Parameters:
      message - the message
      Returns:
      the string