mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 19:39:22 +00:00
Fix hard link to DedicatedSerever when opening a LAN connection causing stalls on connecting.
This commit is contained in:
1 parent
b7ad532ab5
commit
ef07de4f65
5 files changed
+26
-8
No files matched your search
@@ -876,4 +876,10 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||
{
|
||||
return report.func_71505_b() instanceof GameRegistryException;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldAllowPlayerLogins()
|
||||
{
|
||||
return true; //Always true as the server has to be started before clicking 'Open to lan'
|
||||
}
|
||||
}
|
||||
@@ -518,4 +518,9 @@ public class FMLCommonHandler
|
||||
{
|
||||
return sidedDelegate.getDefaultMissingAction();
|
||||
}
|
||||
|
||||
public boolean shouldAllowPlayerLogins()
|
||||
{
|
||||
return sidedDelegate.shouldAllowPlayerLogins();
|
||||
}
|
||||
}
|
||||
@@ -61,4 +61,6 @@ public interface IFMLSidedHandler
|
||||
void serverLoadedSuccessfully();
|
||||
|
||||
void failedServerLoading(RuntimeException ex, WorldAccessContainer wac);
|
||||
|
||||
boolean shouldAllowPlayerLogins();
|
||||
}
|
||||
@@ -18,6 +18,7 @@ import net.minecraft.network.INetHandler;
|
||||
import net.minecraft.network.NetHandlerPlayServer;
|
||||
import net.minecraft.network.NetworkManager;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.dedicated.DedicatedServer;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.IFMLSidedHandler;
|
||||
@@ -196,4 +197,9 @@ public class FMLServerHandler implements IFMLSidedHandler
|
||||
{
|
||||
|
||||
}
|
||||
@Override
|
||||
public boolean shouldAllowPlayerLogins()
|
||||
{
|
||||
return DedicatedServer.allowPlayerLogins;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user