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() + "\"");
|
||||
this.func_71247_a(this.func_71270_I(), this.func_71270_I(), k, worldtype, s2);
|
||||
long i1 = System.nanoTime() - j;
|
||||
@@ -268,7 +274,8 @@
|
||||
@@ -268,7 +274,7 @@
|
||||
this.field_71339_n.func_72602_a();
|
||||
}
|
||||
|
||||
- return true;
|
||||
+ allowPlayerLogins = true;
|
||||
+ return FMLCommonHandler.instance().handleServerStarting(this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue