@@ -112,7 +112,6 @@ public abstract class Server implements IServer {
112112
113113 public final Properties serverProp ;
114114
115-
116115 public Server (GameServer gServer ,boolean useUDP ) {
117116
118117 Server .sender = new RuntimeServer (this );
@@ -150,16 +149,9 @@ public Server(GameServer gServer,boolean useUDP) {
150149 this .serverProp = getFileSystem ().serverProperties (server );
151150
152151
153- getLogger ().info ("Connecting the multiAdmin | LocalAdmin" );
154-
155- try {
156- ServerSocket socket = new ServerSocket (20003 );
157-
158- socket .accept ();
152+ getLogger ().multiInfo (getClass (),"Connecting the multiAdmin | LocalAdmin" ,"" ,"" );
159153
160- }catch (Exception e ){
161154
162- }
163155
164156 this .pluginManager = new PluginManager (server );
165157
@@ -177,26 +169,36 @@ public Server(GameServer gServer,boolean useUDP) {
177169
178170 this .isDebug = Boolean .parseBoolean (serverProp .getProperty (DEBUG ));
179171
180- this .plugins = PluginClassLoader .getClassLoader ().loadPlugins (pluginDir );
181-
182172 this .registerNativeEvents ();
183173
184- this .useUDP = useUDP ;
174+ try {
175+ this .chooseLangOrStart ();
176+ scheduler .executeRunnable (()->Utils .TryCatch (this ::startConsoleCommand ));
177+
178+ ServerSocket socket = new ServerSocket (20003 );
179+
180+ socket .accept ();
181+
182+ }catch (Exception e ){
183+
184+ }
185185
186+ getLogger ().multiInfo (getClass (),"Connect successfully,loading plugins..." ,"" ,"" );
187+ //加载插件
188+ this .plugins = PluginClassLoader .getClassLoader ().loadPlugins (pluginDir );
186189
190+ this .useUDP = useUDP ;
187191
188192 }
189193
190194 public void start (Class <?> main ,String [] args ) {
191195 startWatch (main ,args );
192- Utils .TryCatch (this ::startConsoleCommand );
193196 }
194197
195198 public void startWatch (Class <?> main ,String [] args ) {
196199 Utils .TryCatch (()-> {
197200 this .log .multiInfo (this .getClass (),main .getSimpleName () + "::start::" + main .getName (),"" ,"" );
198201 this .executeEmerald (args , true );
199- this .chooseLangOrStart ();
200202 this .start ();
201203 this .successTime ();
202204 });
0 commit comments