Package com.comphenix.protocol.utility
Class ChatExtensions
java.lang.Object
com.comphenix.protocol.utility.ChatExtensions
Utility methods for sending chat messages.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbroadcastMessageSilently(String message, String permission) Broadcast a message without invoking any packet listeners.static List<PacketContainer> createChatPackets(String message) Construct chat packet to send in order to display a given message.voidsendMessageSilently(org.bukkit.command.CommandSender receiver, String message) Send a message without invoking the packet listeners.static String[]toFlowerBox(String[] message, String marginChar, int marginWidth, int marginHeight) Print a flower box around a given message.
-
Constructor Details
-
ChatExtensions
-
-
Method Details
-
createChatPackets
Construct chat packet to send in order to display a given message.- Parameters:
message- - the message to send.- Returns:
- The packets.
-
toFlowerBox
public static String[] toFlowerBox(String[] message, String marginChar, int marginWidth, int marginHeight) Print a flower box around a given message.- Parameters:
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.- Returns:
- Flowerboxed message
-
sendMessageSilently
Send a message without invoking the packet listeners.- Parameters:
receiver- - the receiver.message- - the message to send.
-
broadcastMessageSilently
Broadcast a message without invoking any packet listeners.- Parameters:
message- - message to send.permission- - permission required to receieve the message. NULL to target everyone.
-