Class MVMessaging
- java.lang.Object
-
- com.onarandombox.MultiverseCore.utils.MVMessaging
-
- All Implemented Interfaces:
MultiverseMessaging
public class MVMessaging extends java.lang.Object implements MultiverseMessaging
The default-implementation ofMultiverseMessaging.
-
-
Constructor Summary
Constructors Constructor Description MVMessaging()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCooldown()Gets the message-cooldown.booleansendMessage(org.bukkit.command.CommandSender sender, java.lang.String message, boolean ignoreCooldown)Sends a message to the specified sender if the cooldown has passed.booleansendMessages(org.bukkit.command.CommandSender sender, java.lang.String[] messages, boolean ignoreCooldown)Sends a group of messages to the specified sender if the cooldown has passed.booleansendMessages(org.bukkit.command.CommandSender sender, java.util.Collection<java.lang.String> messages, boolean ignoreCooldown)Sends a group of messages to the specified sender if the cooldown has passed.voidsetCooldown(int milliseconds)Sets the message-cooldown.
-
-
-
Method Detail
-
setCooldown
public void setCooldown(int milliseconds)
Sets the message-cooldown.- Specified by:
setCooldownin interfaceMultiverseMessaging- Parameters:
milliseconds- The new message-cooldown in milliseconds.
-
sendMessage
public boolean sendMessage(org.bukkit.command.CommandSender sender, java.lang.String message, boolean ignoreCooldown)Sends a message to the specified sender if the cooldown has passed.- Specified by:
sendMessagein interfaceMultiverseMessaging- Parameters:
sender- The person/console to send the message to.message- The message to send.ignoreCooldown- If true this message will always be sent. Useful for things like menus- Returns:
- true if the message was sent, false if not.
-
sendMessages
public boolean sendMessages(org.bukkit.command.CommandSender sender, java.lang.String[] messages, boolean ignoreCooldown)Sends a group of messages to the specified sender if the cooldown has passed. This method is needed, since sending many messages in quick succession would violate the cooldown.- Specified by:
sendMessagesin interfaceMultiverseMessaging- Parameters:
sender- The person/console to send the message to.messages- The messages to send.ignoreCooldown- If true these messages will always be sent. Useful for things like menus- Returns:
- true if the message was sent, false if not.
-
sendMessages
public boolean sendMessages(org.bukkit.command.CommandSender sender, java.util.Collection<java.lang.String> messages, boolean ignoreCooldown)Sends a group of messages to the specified sender if the cooldown has passed. This method is needed, since sending many messages in quick succession would violate the cooldown.- Specified by:
sendMessagesin interfaceMultiverseMessaging- Parameters:
sender- The person/console to send the message to.messages- The messages to send.ignoreCooldown- If true these messages will always be sent. Useful for things like menus- Returns:
- true if the message was sent, false if not.
-
getCooldown
public int getCooldown()
Gets the message-cooldown.- Specified by:
getCooldownin interfaceMultiverseMessaging- Returns:
- The message-cooldown.
-
-