Fixed networking API connections being reset when reloading config
Credit: https://github.com/PlayPro/CoreProtect/pull/211/files#diff-1342ad937bb4d40012db93a64c02a41e92f2d6f35b069435f464af03aca69b00 (@vacla)
This commit is contained in:
parent
3db2159292
commit
272ecae858
1 changed files with 4 additions and 1 deletions
|
|
@ -414,7 +414,10 @@ public class ConfigHandler extends Queue {
|
||||||
|
|
||||||
ConfigHandler.loadConfig(); // Load (or create) the configuration file.
|
ConfigHandler.loadConfig(); // Load (or create) the configuration file.
|
||||||
ConfigHandler.loadDatabase(); // Initialize MySQL and create tables if necessary.
|
ConfigHandler.loadDatabase(); // Initialize MySQL and create tables if necessary.
|
||||||
ListenerHandler.registerNetworking(); // Register channels for networking API
|
|
||||||
|
if (startup) {
|
||||||
|
ListenerHandler.registerNetworking(); // Register channels for networking API
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue