From 1d59fd192f63c57db13817519654be4746388edc Mon Sep 17 00:00:00 2001 From: Shuiling <1668589925@qq.com> Date: Wed, 31 Jul 2024 11:11:27 -0700 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BA=86IP=E5=9C=B0?= =?UTF-8?q?=E5=9D=80=E5=90=8C=E6=97=B6=E5=9C=A8=E7=BA=BF=E7=8E=A9=E5=AE=B6?= =?UTF-8?q?=E6=95=B0=E9=87=8F=E5=88=A4=E6=96=AD=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/cc/baka9/catseedlogin/bukkit/Listeners.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/cc/baka9/catseedlogin/bukkit/Listeners.java b/src/main/java/cc/baka9/catseedlogin/bukkit/Listeners.java index a081895..ec6ec1d 100644 --- a/src/main/java/cc/baka9/catseedlogin/bukkit/Listeners.java +++ b/src/main/java/cc/baka9/catseedlogin/bukkit/Listeners.java @@ -67,7 +67,7 @@ public void onPlayerLogin(AsyncPlayerPreLoginEvent event) { long count = Bukkit.getOnlinePlayers().stream() .filter(p -> p.getAddress().getAddress().getHostAddress().equals(hostAddress)) .count(); - if (count >= Config.Settings.IpCountLimit) { + if (count == Config.Settings.IpCountLimit) { event.disallow(AsyncPlayerPreLoginEvent.Result.KICK_OTHER, "太多相同ip的账号同时在线!"); } }