001    package org.bukkit.plugin.messaging;
002    
003    /**
004     * Thrown if a Plugin Message is sent that is too large to be sent.
005     */
006    @SuppressWarnings("serial")
007    public class MessageTooLargeException extends RuntimeException {
008        public MessageTooLargeException() {
009            this("Attempted to send a plugin message that was too large. The maximum length a plugin message may be is " + Messenger.MAX_MESSAGE_SIZE + " bytes.");
010        }
011    
012        public MessageTooLargeException(byte[] message) {
013            this(message.length);
014        }
015    
016        public MessageTooLargeException(int length) {
017            this("Attempted to send a plugin message that was too large. The maximum length a plugin message may be is " + Messenger.MAX_MESSAGE_SIZE + " bytes (tried to send one that is " + length + " bytes long).");
018        }
019    
020        public MessageTooLargeException(String msg) {
021            super(msg);
022        }
023    }