Skip to content

Commit

Permalink
fix: 修复了IP地址同时在线玩家数量判断错误
Browse files Browse the repository at this point in the history
  • Loading branch information
shulng committed Jul 31, 2024
1 parent c0f21c9 commit 1d59fd1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/cc/baka9/catseedlogin/bukkit/Listeners.java
Original file line number Diff line number Diff line change
Expand Up @@ -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的账号同时在线!");
}
}
Expand Down

0 comments on commit 1d59fd1

Please sign in to comment.