Class MessageUtil

java.lang.Object
net.lewmc.essence.utils.MessageUtil

public class MessageUtil extends Object
Essence's Messaging Utility
  • Constructor Details

    • MessageUtil

      public MessageUtil(org.bukkit.command.CommandSender cs, Essence plugin)
      Constructor for the MessageUtil class
      Parameters:
      cs - CommandSender - the user who sent the command.
      plugin - Reference to the main Essence class.
  • Method Details

    • send

      public void send(String group, String message, String[] replace)
      Send a message to the user with additional data.
      Parameters:
      group - String - The group the message belongs to in the language file.
      message - String - The message taken from the language file.
      replace - String[] - Text that should be put in place of {{X}} in the message.
      Since:
      1.5.3
    • send

      public void send(String group, String message)
      Send a message to the user.
      Parameters:
      group - String - The group the message belongs to in the language file.
      message - String - The message taken from the language file.
      Since:
      1.6.0
    • sendTo

      public void sendTo(org.bukkit.command.CommandSender cs, String group, String message)
      Send a message to a user.
      Parameters:
      cs - CommandSender - The player to send the message to.
      group - String - The group the message belongs to in the language file.
      message - String - The message taken from the language file.
      Since:
      1.6.0
    • sendTo

      public void sendTo(org.bukkit.command.CommandSender cs, String group, String message, String[] replace)
      Send a message to a user.
      Parameters:
      cs - CommandSender - The player to send the message to.
      group - String - The group the message belongs to in the language file.
      message - String - The message taken from the language file.
      replace - String[] - Text that should be put in place of {{X}} in the message.
      Since:
      1.6.0
    • broadcast

      public void broadcast(String message)
      Broadcasts a message to the server.
      Parameters:
      message - String - The message to be sent.