mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-27 15:33:18 +00:00
AllowPlayerLogins only after the server has completed the core init tasks. Closes #372
This commit is contained in:
1 parent
0607bffb92
commit
2d37b14555
5 files changed
+19
-7
No files matched your search
@@ -146,7 +146,7 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||
|
||||
private CustomModLoadingErrorDisplayException customError;
|
||||
|
||||
private DuplicateModsFoundException dupesFound;
|
||||
private DuplicateModsFoundException dupesFound;
|
||||
|
||||
private boolean serverShouldBeKilledQuietly;
|
||||
|
||||
@@ -209,7 +209,7 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||
}
|
||||
catch (DuplicateModsFoundException dupes)
|
||||
{
|
||||
dupesFound = dupes;
|
||||
dupesFound = dupes;
|
||||
}
|
||||
catch (MissingModsException missing)
|
||||
{
|
||||
@@ -371,9 +371,9 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||
{
|
||||
showGuiScreen(new GuiSortingProblem(modSorting));
|
||||
}
|
||||
else if (customError != null)
|
||||
else if (customError != null)
|
||||
{
|
||||
showGuiScreen(new GuiCustomModLoadingErrorScreen(customError));
|
||||
showGuiScreen(new GuiCustomModLoadingErrorScreen(customError));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -870,4 +870,9 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||
{
|
||||
return true; //Always true as the server has to be started before clicking 'Open to lan'
|
||||
}
|
||||
|
||||
@Override
|
||||
public void allowLogins() {
|
||||
// NOOP for integrated server
|
||||
}
|
||||
}
|
||||
@@ -215,7 +215,7 @@ public class FMLCommonHandler
|
||||
}
|
||||
if (sidedDelegate!=null)
|
||||
{
|
||||
brd.addAll(sidedDelegate.getAdditionalBrandingInformation());
|
||||
brd.addAll(sidedDelegate.getAdditionalBrandingInformation());
|
||||
}
|
||||
if (Loader.instance().getFMLBrandingProperties().containsKey("fmlbranding"))
|
||||
{
|
||||
@@ -281,6 +281,7 @@ public class FMLCommonHandler
|
||||
public void handleServerStarted()
|
||||
{
|
||||
Loader.instance().serverStarted();
|
||||
sidedDelegate.allowLogins();
|
||||
}
|
||||
|
||||
public void handleServerStopping()
|
||||
|
||||
@@ -59,4 +59,6 @@ public interface IFMLSidedHandler
|
||||
void fireNetRegistrationEvent(EventBus bus, NetworkManager manager, Set<String> channelSet, String channel, Side side);
|
||||
|
||||
boolean shouldAllowPlayerLogins();
|
||||
|
||||
void allowLogins();
|
||||
}
|
||||
@@ -259,4 +259,9 @@ public class FMLServerHandler implements IFMLSidedHandler
|
||||
{
|
||||
return DedicatedServer.allowPlayerLogins;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void allowLogins() {
|
||||
DedicatedServer.allowPlayerLogins = true;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user