Fixed Server Crash.

This commit is contained in:
AlgorithmX2 2014-02-16 15:12:41 -06:00
parent dc095749b7
commit aa91549488

View file

@ -26,8 +26,32 @@ public class NetworkHandler
ec = NetworkRegistry.INSTANCE.newEventDrivenChannel( myChannelName = channelName );
ec.register( this );
clientHandler = new AppEngClientPacketHandler();
serveHandler = new AppEngServerPacketHandler();
clientHandler = createClientSide();
serveHandler = createServerSide();
}
private IPacketHandler createServerSide()
{
try
{
return new AppEngServerPacketHandler();
}
catch (Throwable t)
{
return null;
}
}
private IPacketHandler createClientSide()
{
try
{
return new AppEngClientPacketHandler();
}
catch (Throwable t)
{
return null;
}
}
@SubscribeEvent