Skip to content

Commit

Permalink
feat(LoginPlayerHelper): 限制玩家通过本地环回地址登录
Browse files Browse the repository at this point in the history
  • Loading branch information
shulng committed Sep 6, 2024
1 parent 72a8968 commit da5795e
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ public static boolean recordCurrentIP(Player player) {
List<String> storedIPs = getStoredIPs(storedPlayer);
Long exitTime = playerExitTimes.get(playerName);

if (currentIP.equals("127.0.0.1")) {
return false;
}

if (Config.Settings.IPTimeout == 0) {
return storedIPs.contains(currentIP);
} else {
Expand Down

0 comments on commit da5795e

Please sign in to comment.