@@ -156,12 +156,6 @@ public class GeyserImpl implements GeyserApi, EventRegistrar {
156156
157157 private final SessionManager sessionManager = new SessionManager ();
158158
159- /**
160- * This is used in GeyserConnect to stop the bedrock server binding to a port
161- */
162- @ Setter
163- private static boolean shouldStartListener = true ;
164-
165159 private FloodgateCipher cipher ;
166160 private FloodgateSkinUploader skinUploader ;
167161 private NewsHandler newsHandler ;
@@ -435,24 +429,22 @@ private void startInstance() {
435429 bedrockThreadCount = Math .max (1 , SystemPropertyUtil .getInt ("io.netty.eventLoopThreads" , NettyRuntime .availableProcessors () * 2 ));
436430 }
437431
438- if (shouldStartListener ) {
439- this .geyserServer = new GeyserServer (this , bedrockThreadCount );
440- this .geyserServer .bind (new InetSocketAddress (config .getBedrock ().address (), config .getBedrock ().port ()))
441- .whenComplete ((avoid , throwable ) -> {
442- if (throwable == null ) {
443- logger .info (GeyserLocale .getLocaleStringLog ("geyser.core.start" , config .getBedrock ().address (),
444- String .valueOf (config .getBedrock ().port ())));
445- } else {
446- String address = config .getBedrock ().address ();
447- int port = config .getBedrock ().port ();
448- logger .severe (GeyserLocale .getLocaleStringLog ("geyser.core.fail" , address , String .valueOf (port )));
449- if (!"0.0.0.0" .equals (address )) {
450- logger .info (Component .text ("Suggestion: try setting `address` under `bedrock` in the Geyser config back to 0.0.0.0" , NamedTextColor .GREEN ));
451- logger .info (Component .text ("Then, restart this server." , NamedTextColor .GREEN ));
452- }
432+ this .geyserServer = new GeyserServer (this , bedrockThreadCount );
433+ this .geyserServer .bind (new InetSocketAddress (config .getBedrock ().address (), config .getBedrock ().port ()))
434+ .whenComplete ((avoid , throwable ) -> {
435+ if (throwable == null ) {
436+ logger .info (GeyserLocale .getLocaleStringLog ("geyser.core.start" , config .getBedrock ().address (),
437+ String .valueOf (config .getBedrock ().port ())));
438+ } else {
439+ String address = config .getBedrock ().address ();
440+ int port = config .getBedrock ().port ();
441+ logger .severe (GeyserLocale .getLocaleStringLog ("geyser.core.fail" , address , String .valueOf (port )));
442+ if (!"0.0.0.0" .equals (address )) {
443+ logger .info (Component .text ("Suggestion: try setting `address` under `bedrock` in the Geyser config back to 0.0.0.0" , NamedTextColor .GREEN ));
444+ logger .info (Component .text ("Then, restart this server." , NamedTextColor .GREEN ));
453445 }
454- }). join ();
455- }
446+ }
447+ }). join ();
456448
457449 if (config .getRemote ().authType () == AuthType .FLOODGATE ) {
458450 try {
0 commit comments