AllowPlayerLogins only after the server has completed the core init tasks. Closes #372
This commit is contained in:
parent
0607bffb92
commit
2d37b14555
5 changed files with 19 additions and 7 deletions
|
@ -40,12 +40,11 @@
|
||||||
field_155771_h.info("Preparing level \"" + this.func_71270_I() + "\"");
|
field_155771_h.info("Preparing level \"" + this.func_71270_I() + "\"");
|
||||||
this.func_71247_a(this.func_71270_I(), this.func_71270_I(), k, worldtype, s2);
|
this.func_71247_a(this.func_71270_I(), this.func_71270_I(), k, worldtype, s2);
|
||||||
long i1 = System.nanoTime() - j;
|
long i1 = System.nanoTime() - j;
|
||||||
@@ -268,7 +274,8 @@
|
@@ -268,7 +274,7 @@
|
||||||
this.field_71339_n.func_72602_a();
|
this.field_71339_n.func_72602_a();
|
||||||
}
|
}
|
||||||
|
|
||||||
- return true;
|
- return true;
|
||||||
+ allowPlayerLogins = true;
|
|
||||||
+ return FMLCommonHandler.instance().handleServerStarting(this);
|
+ return FMLCommonHandler.instance().handleServerStarting(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -146,7 +146,7 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||||
|
|
||||||
private CustomModLoadingErrorDisplayException customError;
|
private CustomModLoadingErrorDisplayException customError;
|
||||||
|
|
||||||
private DuplicateModsFoundException dupesFound;
|
private DuplicateModsFoundException dupesFound;
|
||||||
|
|
||||||
private boolean serverShouldBeKilledQuietly;
|
private boolean serverShouldBeKilledQuietly;
|
||||||
|
|
||||||
|
@ -209,7 +209,7 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||||
}
|
}
|
||||||
catch (DuplicateModsFoundException dupes)
|
catch (DuplicateModsFoundException dupes)
|
||||||
{
|
{
|
||||||
dupesFound = dupes;
|
dupesFound = dupes;
|
||||||
}
|
}
|
||||||
catch (MissingModsException missing)
|
catch (MissingModsException missing)
|
||||||
{
|
{
|
||||||
|
@ -371,9 +371,9 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||||
{
|
{
|
||||||
showGuiScreen(new GuiSortingProblem(modSorting));
|
showGuiScreen(new GuiSortingProblem(modSorting));
|
||||||
}
|
}
|
||||||
else if (customError != null)
|
else if (customError != null)
|
||||||
{
|
{
|
||||||
showGuiScreen(new GuiCustomModLoadingErrorScreen(customError));
|
showGuiScreen(new GuiCustomModLoadingErrorScreen(customError));
|
||||||
}
|
}
|
||||||
else
|
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'
|
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)
|
if (sidedDelegate!=null)
|
||||||
{
|
{
|
||||||
brd.addAll(sidedDelegate.getAdditionalBrandingInformation());
|
brd.addAll(sidedDelegate.getAdditionalBrandingInformation());
|
||||||
}
|
}
|
||||||
if (Loader.instance().getFMLBrandingProperties().containsKey("fmlbranding"))
|
if (Loader.instance().getFMLBrandingProperties().containsKey("fmlbranding"))
|
||||||
{
|
{
|
||||||
|
@ -281,6 +281,7 @@ public class FMLCommonHandler
|
||||||
public void handleServerStarted()
|
public void handleServerStarted()
|
||||||
{
|
{
|
||||||
Loader.instance().serverStarted();
|
Loader.instance().serverStarted();
|
||||||
|
sidedDelegate.allowLogins();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void handleServerStopping()
|
public void handleServerStopping()
|
||||||
|
|
|
@ -59,4 +59,6 @@ public interface IFMLSidedHandler
|
||||||
void fireNetRegistrationEvent(EventBus bus, NetworkManager manager, Set<String> channelSet, String channel, Side side);
|
void fireNetRegistrationEvent(EventBus bus, NetworkManager manager, Set<String> channelSet, String channel, Side side);
|
||||||
|
|
||||||
boolean shouldAllowPlayerLogins();
|
boolean shouldAllowPlayerLogins();
|
||||||
|
|
||||||
|
void allowLogins();
|
||||||
}
|
}
|
||||||
|
|
|
@ -259,4 +259,9 @@ public class FMLServerHandler implements IFMLSidedHandler
|
||||||
{
|
{
|
||||||
return DedicatedServer.allowPlayerLogins;
|
return DedicatedServer.allowPlayerLogins;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void allowLogins() {
|
||||||
|
DedicatedServer.allowPlayerLogins = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue