From 18f5ed310241212083113cd75754aca3c1339048 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 2 Jun 2013 10:30:44 +1000 Subject: [PATCH] Close #410 - forge crashes --- .../main/java/net/md_5/bungee/connection/UpstreamBridge.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java b/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java index b80c50d4..c973f007 100644 --- a/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java +++ b/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java @@ -110,6 +110,11 @@ public class UpstreamBridge extends PacketHandler { throw new CancelSendSignal(); } + // Hack around Forge race conditions + if ( ( pluginMessage.getData()[0] & 0xFF ) == 1 && pluginMessage.getTag().equals( "FML" ) ) + { + throw new CancelSendSignal(); + } PluginMessageEvent event = new PluginMessageEvent( con, con.getServer(), pluginMessage.getTag(), pluginMessage.getData().clone() ); if ( bungee.getPluginManager().callEvent( event ).isCancelled() )