Class MessageHelper

java.lang.Object
me.gigawartrex.smalladditions.helpers.MessageHelper

public class MessageHelper extends Object
Class for sending messages to entities on the server or interacting with it.
Author:
Paul Ferlitz
  • Constructor Summary

    Constructors
    Constructor
    Description
    Class constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Method to send a plain message to all available recipients.
    void
    sendAll(String msg, org.bukkit.ChatColor msgColor)
    Method to send a colored message to all available recipients.
    void
    Method to send a plain message to all online player.
    void
    sendAllPlayers(String msg, org.bukkit.ChatColor msgColor)
    Method to send a colored message to all online player.
    void
    Method to send a plain message to the console.
    void
    sendConsole(String msg, org.bukkit.ChatColor msgColor)
    Method to send a colored message to the console.
    void
    sendPlayer(org.bukkit.entity.Player player, String msg)
    Method to send a plain message to a player.
    void
    sendPlayer(org.bukkit.entity.Player player, String msg, org.bukkit.ChatColor msgColor)
    Method to send a colored message to a player.

    Methods inherited from class java.lang.Object

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

    • MessageHelper

      public MessageHelper()
      Class constructor
  • Method Details

    • sendConsole

      public void sendConsole(String msg, org.bukkit.ChatColor msgColor)
      Method to send a colored message to the console.
      Parameters:
      msg - the message String to be sent
      msgColor - the ChatColor of the message sent
    • sendConsole

      public void sendConsole(String msg)
      Method to send a plain message to the console. ChatColor defaults to ChatColor.WHITE
      Parameters:
      msg - the message String to be sent
      See Also:
    • sendPlayer

      public void sendPlayer(org.bukkit.entity.Player player, String msg, org.bukkit.ChatColor msgColor)
      Method to send a colored message to a player.
      Parameters:
      player - the target Player
      msg - the String to be sent
      msgColor - the ChatColor of the message sent
    • sendPlayer

      public void sendPlayer(org.bukkit.entity.Player player, String msg)
      Method to send a plain message to a player. ChatColor defaults to ChatColor.WHITE
      Parameters:
      player - the target Player
      msg - the String to be sent
      See Also:
    • sendAllPlayers

      public void sendAllPlayers(String msg, org.bukkit.ChatColor msgColor)
      Method to send a colored message to all online player.
      Parameters:
      msg - the String to be sent
      msgColor - the ChatColor of the message sent
    • sendAllPlayers

      public void sendAllPlayers(String msg)
      Method to send a plain message to all online player. ChatColor defaults to ChatColor.WHITE.
      Parameters:
      msg - the String to be sent
      See Also:
    • sendAll

      public void sendAll(String msg, org.bukkit.ChatColor msgColor)
      Method to send a colored message to all available recipients. Uses sendConsole(String, ChatColor) and sendAllPlayers(String, ChatColor).
      Parameters:
      msg - the String to be sent
      msgColor - the ChatColor of the message sent
    • sendAll

      public void sendAll(String msg)
      Method to send a plain message to all available recipients. ChatColor defaults to ChatColor.WHITE.
      Parameters:
      msg - The String to be sent.
      See Also: