Add max length to PM messages

This commit is contained in:
Alejandro 2019-06-23 23:15:25 +03:00
parent 236c4adc0a
commit 634c2cbfc3

View File

@ -25,6 +25,8 @@ public class FriendPrivateMessageEvent extends MessageHandler {
if (buddy == null)
return;
if (message.length() > 255) message = message.substring(0, 255);
UserFriendChatEvent event = new UserFriendChatEvent(this.client.getHabbo(), buddy, message);
if (Emulator.getPluginManager().fireEvent(event).isCancelled())
return;