fix: emergency fix discord and other stuff not working because of last commit

This commit is contained in:
ChomeNS
2025-04-09 19:04:48 +07:00
parent f811000a07
commit 72cbad0a99
3 changed files with 9 additions and 5 deletions

View File

@@ -169,11 +169,15 @@ public class Bot extends SessionAdapter {
this.whitelist = new WhitelistPlugin(this);
this.playersDatabase = new PlayersDatabasePlugin(this);
this.ipFilter = new IPFilterPlugin(this);
for (final Listener listener : listeners) listener.loadedPlugins(this);
}
protected void reconnect () {
protected void connect () {
for (final Listener listener : listeners) listener.loadedPlugins(this);
reconnect();
}
private void reconnect () {
if (session != null) session = null; // does this do nothing?
for (final Listener listener : listeners) {

View File

@@ -141,7 +141,7 @@ public class Main {
LoggerUtilities.log("Initialized all bots. Now connecting");
for (final Bot bot : bots) bot.reconnect();
for (final Bot bot : bots) bot.connect();
} catch (final Exception e) {
LoggerUtilities.error(e);