public class ChatExtensions
extends java.lang.Object
Constructor and Description |
---|
ChatExtensions(ProtocolManager manager) |
Modifier and Type | Method and Description |
---|---|
void |
broadcastMessageSilently(java.lang.String message,
java.lang.String permission)
Broadcast a message without invoking any packet listeners.
|
static PacketContainer[] |
createChatPackets(java.lang.String message)
Construct chat packet to send in order to display a given message.
|
void |
sendMessageSilently(org.bukkit.command.CommandSender receiver,
java.lang.String message)
Send a message without invoking the packet listeners.
|
static java.lang.String[] |
toFlowerBox(java.lang.String[] message,
java.lang.String marginChar,
int marginWidth,
int marginHeight)
Print a flower box around a given message.
|
public ChatExtensions(ProtocolManager manager)
public void sendMessageSilently(org.bukkit.command.CommandSender receiver, java.lang.String message) throws java.lang.reflect.InvocationTargetException
receiver
- - the receiver.message
- - the message to send.java.lang.reflect.InvocationTargetException
- If we were unable to send the message.public static PacketContainer[] createChatPackets(java.lang.String message)
message
- - the message to send.public void broadcastMessageSilently(java.lang.String message, java.lang.String permission) throws java.lang.reflect.InvocationTargetException
message
- - message to send.permission
- - permission required to receieve the message. NULL to target everyone.java.lang.reflect.InvocationTargetException
- If we were unable to send the message.public static java.lang.String[] toFlowerBox(java.lang.String[] message, java.lang.String marginChar, int marginWidth, int marginHeight)
message
- - the message to print.marginChar
- - the character to use as margin.marginWidth
- - the width (in characters) of the left and right margin.marginHeight
- - the height (in characters) of the top and buttom margin.