Class MessageUtils

java.lang.Object
me.devtec.amazingtags.utils.MessageUtils

public class MessageUtils extends Object
  • Constructor Details

    • MessageUtils

      public MessageUtils()
  • Method Details

    • getPrefix

      public static String getPrefix()
      Gets prefix from translation file
    • placeholder

      public static List<String> placeholder(org.bukkit.command.CommandSender sender, List<String> string, MessageUtils.Placeholders placeholders)
      Method used to replace placeholders in messages
      Parameters:
      sender - - The player to whom you are sending the message
      message - - Message where you want to replace placeholders
      placeholders -
      Returns:
      Returning edited message
    • placeholder

      public static String placeholder(org.bukkit.command.CommandSender sender, String message, MessageUtils.Placeholders placeholders)
      Method used to replace placeholders in message.
      Parameters:
      sender - - The player to whom you are sending the message
      message - - Message where you want to replace placeholders
      placeholders -
      Returns:
      Returning edited message
    • message

      public static void message(org.bukkit.command.CommandSender player, String path, MessageUtils.Placeholders placeholders)
      Sending message from translation Config.
      Parameters:
      player - - Original message receiver
      path - - Path to that message in the file
      placeholders - - MessageUtils.Placeholders
    • message

      public static void message(org.bukkit.command.CommandSender player, String path, MessageUtils.Placeholders placeholders, boolean split)
      Sending message from translation Config.
      Parameters:
      player - - Original message receiver
      path - - Path to that message in the file
      placeholders - - MessageUtils.Placeholders
      split - - If plugin should search for /n characters to split message into multiple lines
    • message

      public static void message(org.bukkit.command.CommandSender player, String path, MessageUtils.Placeholders placeholders, org.bukkit.command.CommandSender... targets)
      Sending message from translation Config.
      Parameters:
      player - - Original message receiver
      path - - Path to that message in the file
      placeholders - - MessageUtils.Placeholders
      targets - - More targets (THIS SHOULD INCLUDE ORIGINAL MESSAGE RECEIVER IF YOU ALSO WANT TO SEND HIM THIS MESSAGE)
    • message

      public static void message(org.bukkit.command.CommandSender player, String path, MessageUtils.Placeholders placeholders, boolean split, org.bukkit.command.CommandSender... targets)
      Sending message from translation Config.
      Parameters:
      player - - Original message receiver
      path - - Path to that message in the file
      placeholders - - MessageUtils.Placeholders
      split - - If plugin should search for /n characters to split message into multiple lines
      targets - - More targets (THIS SHOULD INCLUDE ORIGINAL MESSAGE RECEIVER IF YOU ALSO WANT TO SEND HIM THIS MESSAGE)
    • msgConfig

      public static void msgConfig(org.bukkit.command.CommandSender player, String path, me.devtec.shared.dataholder.Config config, MessageUtils.Placeholders placeholders)
      Sending message from specific Config file
      Parameters:
      player - - Original message receiver
      path - - Path to that message in the file
      config - - File where the message is located (Config)
      placeholders - - MessageUtils.Placeholders
    • msgConfig

      public static void msgConfig(org.bukkit.command.CommandSender player, String path, me.devtec.shared.dataholder.Config config, MessageUtils.Placeholders placeholders, boolean split)
      Sending message from specific Config file
      Parameters:
      player - - Original message receiver
      path - - Path to that message in the file
      config - - File where the message is located (Config)
      placeholders - - MessageUtils.Placeholders
      split - - If plugin should search for /n characters to split message into multiple lines
    • msgConfig

      public static void msgConfig(org.bukkit.command.CommandSender player, String path, me.devtec.shared.dataholder.Config config, MessageUtils.Placeholders placeholders, org.bukkit.command.CommandSender... targets)
      Sending message from specific Config file
      Parameters:
      player - - Original message receiver
      path - - Path to that message in the file
      config - - File where the message is located (Config)
      placeholders - - MessageUtils.Placeholders
      targets - - More targets (THIS SHOULD INCLUDE ORIGINAL MESSAGE RECEIVER IF YOU ALSO WANT TO SEND HIM THIS MESSAGE)
    • msgConfig

      public static void msgConfig(org.bukkit.command.CommandSender player, String path, me.devtec.shared.dataholder.Config config, MessageUtils.Placeholders placeholders, boolean split, org.bukkit.command.CommandSender... targets)
      Sending message from specific Config file
      Parameters:
      player - - Original message receiver
      path - - Path to that message in the file
      config - - File where the message is located (Config)
      placeholders - - MessageUtils.Placeholders
      split - - If plugin should search for /n characters to split message into multiple lines
      targets - - More targets (THIS SHOULD INCLUDE ORIGINAL MESSAGE RECEIVER IF YOU ALSO WANT TO SEND HIM THIS MESSAGE)
    • noPerm

      public static void noPerm(org.bukkit.command.CommandSender player, String permission)
      No permission message...
      Parameters:
      player - - message recipient
      permission - - what permission is player missing
    • msgConsole

      public static void msgConsole(String message, MessageUtils.Placeholders placehholders)
      Sending message to CONSOLE
      Parameters:
      message -
      placehholders - - MessageUtils.Placeholders
    • sendAnnouncement

      public static void sendAnnouncement(String message, org.bukkit.command.CommandSender... targets)
      Sending an announcement message to players
      Parameters:
      message - - message that you want to send
      targets - - receivers
    • msgConfig

      public static void msgConfig(org.bukkit.command.CommandSender player, me.devtec.shared.dataholder.Config config, String path, MessageUtils.Placeholders placeholders, boolean split, org.bukkit.command.CommandSender... targets)
      Main method for sending message.
      Parameters:
      player - - Original message receiver
      config - - File where is your message
      path - - Path to that message in the file
      placeholders - - MessageUtils.Placeholders
      split - - If plugin should search for /n characters to split message into multiple lines
      targets - - More targets (THIS SHOULD INCLUDE ORIGINAL MESSAGE RECEIVER IF YOU ALSO WANT TO SEND HIM THIS MESSAGE)