diff --git a/build-number.txt b/build-number.txt index a2998a8..2d0ce9f 100644 --- a/build-number.txt +++ b/build-number.txt @@ -1 +1 @@ -1120 \ No newline at end of file +1131 \ No newline at end of file diff --git a/src/main/java/me/chayapak1/chomens_bot/plugins/IPFilterPlugin.java b/src/main/java/me/chayapak1/chomens_bot/plugins/IPFilterPlugin.java index 8ae22c4..e5fb587 100644 --- a/src/main/java/me/chayapak1/chomens_bot/plugins/IPFilterPlugin.java +++ b/src/main/java/me/chayapak1/chomens_bot/plugins/IPFilterPlugin.java @@ -25,7 +25,7 @@ public class IPFilterPlugin extends PlayersPlugin.Listener { bot.players.addListener(this); - bot.executor.scheduleAtFixedRate(this::checkAllPlayers, 0, 2, TimeUnit.SECONDS); + bot.executor.scheduleAtFixedRate(this::checkAllPlayers, 0, 10, TimeUnit.SECONDS); } @Override @@ -60,7 +60,9 @@ public class IPFilterPlugin extends PlayersPlugin.Listener { private void checkAllPlayers () { if (filteredIPs.isEmpty()) return; - for (PlayerEntry entry : bot.players.list) check(entry); + bot.executorService.submit(() -> { + for (PlayerEntry entry : bot.players.list) check(entry); + }); } public String remove (int index) {