mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-11-24 03:05:49 +01:00
Mojang caps chat to 100, we should too
This commit is contained in:
parent
56e9e6a245
commit
0f24eaeea3
@ -1,5 +1,6 @@
|
||||
package net.md_5.bungee.connection;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import net.md_5.bungee.BungeeCord;
|
||||
import net.md_5.bungee.EntityMap;
|
||||
import net.md_5.bungee.UserConnection;
|
||||
@ -81,6 +82,8 @@ public class UpstreamBridge extends PacketHandler
|
||||
@Override
|
||||
public void handle(Chat chat) throws Exception
|
||||
{
|
||||
Preconditions.checkArgument( chat.getMessage().length() < 100, "Chat message too long" ); // Mojang limit, check on updates
|
||||
|
||||
ChatEvent chatEvent = new ChatEvent( con, con.getServer(), chat.getMessage() );
|
||||
if ( !bungee.getPluginManager().callEvent( chatEvent ).isCancelled() )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user