Fix FMLServerAboutToStartEvent being fired too late on the integrated server https://github.com/MinecraftForge/MinecraftForge/issues/6859

This commit is contained in:
pupnewfster authored and cpw committed 2020-07-01 21:59:03 -04:00
1 parent d11a582a25
commit b00c91af3c
1 file changed
+3 -2
@@ -1,10 +1,11 @@
--- a/net/minecraft/server/integrated/IntegratedServer.java
+++ b/net/minecraft/server/integrated/IntegratedServer.java
@@ -60,8 +60,9 @@
@@ -59,9 +59,10 @@
this.func_71245_h(true);
field_147148_h.info("Generating keypair");
this.func_71253_a(CryptManager.func_75891_b());
this.func_240800_l__();
+ if (!net.minecraftforge.fml.server.ServerLifecycleHooks.handleServerAboutToStart(this)) return false;
this.func_240800_l__();
this.func_71205_p(this.func_71214_G() + " - " + this.func_240793_aU_().func_76065_j());
- return true;
+ return net.minecraftforge.fml.server.ServerLifecycleHooks.handleServerStarting(this);