diff --git a/proxy/src/main/java/net/md_5/bungee/forge/ForgeClientHandler.java b/proxy/src/main/java/net/md_5/bungee/forge/ForgeClientHandler.java index 673497e5..0d683856 100644 --- a/proxy/src/main/java/net/md_5/bungee/forge/ForgeClientHandler.java +++ b/proxy/src/main/java/net/md_5/bungee/forge/ForgeClientHandler.java @@ -1,5 +1,6 @@ package net.md_5.bungee.forge; +import com.google.common.base.Preconditions; import java.util.ArrayDeque; import java.util.Map; import lombok.AccessLevel; @@ -58,6 +59,7 @@ public class ForgeClientHandler message.setAllowExtendedPacket( true ); // FML allows extended packets so this must be enabled ForgeClientHandshakeState prevState = state; + Preconditions.checkState( packetQueue.size() < 128, "Forge packet queue too big!" ); packetQueue.add( message ); state = state.send( message, con ); if ( state != prevState ) // state finished, send packets