blob: 61af8c4c1f787858e7fb2cbaf3130ce8a7fc17f4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
package org.bukkit.plugin.messaging;
/**
* Thrown if a Plugin Message is sent that is too large to be sent.
*/
@SuppressWarnings("serial")
public class MessageTooLargeException extends RuntimeException {
public MessageTooLargeException() {
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.");
}
public MessageTooLargeException(byte[] message) {
this(message.length);
}
public MessageTooLargeException(int length) {
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).");
}
public MessageTooLargeException(String msg) {
super(msg);
}
}
|