Class ChatColorHandler

java.lang.Object
org.lushplugins.chatcolorhandler.ChatColorHandler

public class ChatColorHandler extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    broadcastMessage(@NotNull String... messages)
    Sends all online players multiple messages
    static void
    broadcastMessage(@Nullable String message)
    Sends all online players a message
    protected static void
     
    protected static void
     
    static void
    sendActionBarMessage(@NotNull org.bukkit.entity.Player[] players, @Nullable String message)
    Sends multiple players an ACTION_BAR message
    static void
    sendActionBarMessage(@NotNull org.bukkit.entity.Player player, @Nullable String message)
    Sends a player an ACTION_BAR message
    static void
    sendMessage(@NotNull org.bukkit.command.CommandSender recipient, @Nullable String message)
    Sends a recipient a message
    static void
    sendMessage(@NotNull org.bukkit.command.CommandSender recipient, @Nullable String... messages)
    Sends a recipient multiple messages
    static void
    sendMessage(org.bukkit.command.CommandSender[] recipients, @Nullable String message)
    Sends multiple recipients a message
    static void
    sendMessage(org.bukkit.command.CommandSender[] recipients, @Nullable String... messages)
    Sends multiple recipients, multiple messages
    static void
    sendTitle(@NotNull org.bukkit.entity.Player[] players, @Nullable String title)
    Send multiple players a TITLE message
    static void
    sendTitle(@NotNull org.bukkit.entity.Player[] players, @Nullable String title, @Nullable String subtitle)
    Send multiple players a TITLE message
    static void
    sendTitle(@NotNull org.bukkit.entity.Player[] players, @Nullable String title, @Nullable String subtitle, int fadeIn, int fadeOut)
    Send multiple players a TITLE message
    static void
    sendTitle(@NotNull org.bukkit.entity.Player[] players, @Nullable String title, @Nullable String subtitle, int fadeIn, int stay, int fadeOut)
    Send multiple players a TITLE message
    static void
    sendTitle(@NotNull org.bukkit.entity.Player player, @Nullable String title)
    Send a player a TITLE message
    static void
    sendTitle(@NotNull org.bukkit.entity.Player player, @Nullable String title, @Nullable String subtitle)
    Send a player a TITLE message
    static void
    sendTitle(@NotNull org.bukkit.entity.Player player, @Nullable String title, @Nullable String subtitle, int fadeIn, int fadeOut)
    Send a player a TITLE message
    static void
    sendTitle(@NotNull org.bukkit.entity.Player player, @Nullable String title, @Nullable String subtitle, int fadeIn, int stay, int fadeOut)
    Send a player a TITLE message
    static org.lushplugins.chatcolorhandler.ChatColorHandlerSettings
     
    static String
    stripColor(@Nullable String string)
    Strips colour from string
    static List<String>
    translate(@NotNull Collection<String> strings)
    Translates a collection of strings to allow for hex colours and placeholders
    static List<String>
    translate(@NotNull Collection<String> strings, List<Parser> parsers)
    Translates a collection of strings to allow for hex colours and placeholders
    static List<String>
    translate(@NotNull Collection<String> strings, org.bukkit.entity.Player player)
    Translates a collection of strings to allow for hex colours and placeholders
    static List<String>
    translate(@NotNull Collection<String> strings, org.bukkit.entity.Player player, List<Parser> parsers)
    Translates a collection of strings to allow for hex colours and placeholders
    static String
    translate(@Nullable String string)
    Translates a string to allow for hex colours and placeholders
    static String
    translate(@Nullable String string, @NotNull List<Parser> parsers)
    Translates a string to allow for hex colours and placeholders
    static String
    translate(@Nullable String string, org.bukkit.entity.Player player)
    Translates a string to allow for hex colours and placeholders
    static String
    translate(@Nullable String string, org.bukkit.entity.Player player, List<Parser> parsers)
    Translates a string to allow for hex colours and placeholders

    Methods inherited from class java.lang.Object

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

    • init

      protected static void init()
    • translate

      public static String translate(@Nullable @Nullable String string)
      Translates a string to allow for hex colours and placeholders
      Parameters:
      string - String to be translated
    • translate

      public static String translate(@Nullable @Nullable String string, @NotNull @NotNull List<Parser> parsers)
      Translates a string to allow for hex colours and placeholders
      Parameters:
      string - String to be translated
      parsers - Parsers which this message won't be parsed through
    • translate

      public static String translate(@Nullable @Nullable String string, org.bukkit.entity.Player player)
      Translates a string to allow for hex colours and placeholders
      Parameters:
      string - String to be translated
      player - Player to parse placeholders for
    • translate

      public static String translate(@Nullable @Nullable String string, org.bukkit.entity.Player player, List<Parser> parsers)
      Translates a string to allow for hex colours and placeholders
      Parameters:
      string - String to be translated
      player - Player to parse placeholders for
      parsers - Parsers which this message will be parsed through
    • translate

      public static List<String> translate(@NotNull @NotNull Collection<String> strings)
      Translates a collection of strings to allow for hex colours and placeholders
      Parameters:
      strings - Strings to be translated
    • translate

      public static List<String> translate(@NotNull @NotNull Collection<String> strings, List<Parser> parsers)
      Translates a collection of strings to allow for hex colours and placeholders
      Parameters:
      strings - Strings to be translated
      parsers - Parsers which this message will be parsed through
    • translate

      public static List<String> translate(@NotNull @NotNull Collection<String> strings, org.bukkit.entity.Player player)
      Translates a collection of strings to allow for hex colours and placeholders
      Parameters:
      strings - Strings to be translated
      player - Player to parse placeholders for
    • translate

      public static List<String> translate(@NotNull @NotNull Collection<String> strings, org.bukkit.entity.Player player, List<Parser> parsers)
      Translates a collection of strings to allow for hex colours and placeholders
      Parameters:
      strings - Strings to be translated
      player - Player to parse placeholders for
      parsers - Parsers which this message will be parsed through
    • stripColor

      public static String stripColor(@Nullable @Nullable String string)
      Strips colour from string
      Parameters:
      string - String to be converted
    • sendMessage

      public static void sendMessage(@NotNull @NotNull org.bukkit.command.CommandSender recipient, @Nullable @Nullable String message)
      Sends a recipient a message
      Parameters:
      recipient - Sender to receive this message
      message - Message to be displayed
    • sendMessage

      public static void sendMessage(@NotNull @NotNull org.bukkit.command.CommandSender recipient, @Nullable @Nullable String... messages)
      Sends a recipient multiple messages
      Parameters:
      recipient - Sender to receive message
      messages - Messages to be displayed
    • sendMessage

      public static void sendMessage(org.bukkit.command.CommandSender[] recipients, @Nullable @Nullable String message)
      Sends multiple recipients a message
      Parameters:
      recipients - Senders to receive message
      message - Message to be displayed
    • sendMessage

      public static void sendMessage(org.bukkit.command.CommandSender[] recipients, @Nullable @Nullable String... messages)
      Sends multiple recipients, multiple messages
      Parameters:
      recipients - Senders to receive this message
      messages - Messages to be displayed
    • broadcastMessage

      public static void broadcastMessage(@Nullable @Nullable String message)
      Sends all online players a message
      Parameters:
      message - Message to be displayed
    • broadcastMessage

      public static void broadcastMessage(@NotNull @NotNull String... messages)
      Sends all online players multiple messages
      Parameters:
      messages - Messages to be displayed
    • sendActionBarMessage

      public static void sendActionBarMessage(@NotNull @NotNull org.bukkit.entity.Player player, @Nullable @Nullable String message)
      Sends a player an ACTION_BAR message
      Parameters:
      player - Player to receive this action bar message
      message - Message to be displayed
    • sendActionBarMessage

      public static void sendActionBarMessage(@NotNull @NotNull org.bukkit.entity.Player[] players, @Nullable @Nullable String message)
      Sends multiple players an ACTION_BAR message
      Parameters:
      players - Players to receive this action bar message
      message - Message to be displayed
    • sendTitle

      public static void sendTitle(@NotNull @NotNull org.bukkit.entity.Player player, @Nullable @Nullable String title)
      Send a player a TITLE message
      Parameters:
      player - Player to receive this title
      title - Title to be displayed
    • sendTitle

      public static void sendTitle(@NotNull @NotNull org.bukkit.entity.Player player, @Nullable @Nullable String title, @Nullable @Nullable String subtitle)
      Send a player a TITLE message
      Parameters:
      player - Player to receive this title
      title - Title to be displayed
      subtitle - Subtitle to be displayed
    • sendTitle

      public static void sendTitle(@NotNull @NotNull org.bukkit.entity.Player player, @Nullable @Nullable String title, @Nullable @Nullable String subtitle, int fadeIn, int fadeOut)
      Send a player a TITLE message
      Parameters:
      player - Player to receive this title
      title - Title to be displayed
      subtitle - Subtitle to be displayed
      fadeIn - Duration for title to fade in
      fadeOut - Duration for title to fade out
    • sendTitle

      public static void sendTitle(@NotNull @NotNull org.bukkit.entity.Player player, @Nullable @Nullable String title, @Nullable @Nullable String subtitle, int fadeIn, int stay, int fadeOut)
      Send a player a TITLE message
      Parameters:
      player - Player to receive this title
      title - Title to be displayed
      subtitle - Subtitle to be displayed
      fadeIn - Duration for title to fade in
      stay - Duration for title to appear
      fadeOut - Duration for title to fade out
    • sendTitle

      public static void sendTitle(@NotNull @NotNull org.bukkit.entity.Player[] players, @Nullable @Nullable String title)
      Send multiple players a TITLE message
      Parameters:
      players - Player to receive this title
      title - Title to be displayed
    • sendTitle

      public static void sendTitle(@NotNull @NotNull org.bukkit.entity.Player[] players, @Nullable @Nullable String title, @Nullable @Nullable String subtitle)
      Send multiple players a TITLE message
      Parameters:
      players - Player to receive this title
      title - Title to be displayed
      subtitle - Subtitle to be displayed
    • sendTitle

      public static void sendTitle(@NotNull @NotNull org.bukkit.entity.Player[] players, @Nullable @Nullable String title, @Nullable @Nullable String subtitle, int fadeIn, int fadeOut)
      Send multiple players a TITLE message
      Parameters:
      players - Player to receive this title
      title - Title to be displayed
      subtitle - Subtitle to be displayed
      fadeIn - Duration for title to fade in
      fadeOut - Duration for title to fade out
    • sendTitle

      public static void sendTitle(@NotNull @NotNull org.bukkit.entity.Player[] players, @Nullable @Nullable String title, @Nullable @Nullable String subtitle, int fadeIn, int stay, int fadeOut)
      Send multiple players a TITLE message
      Parameters:
      players - Player to receive this title
      title - Title to be displayed
      subtitle - Subtitle to be displayed
      fadeIn - Duration for title to fade in
      stay - Duration for title to appear
      fadeOut - Duration for title to fade out
    • settings

      public static org.lushplugins.chatcolorhandler.ChatColorHandlerSettings settings()
    • debugLog

      protected static void debugLog(String log)