Paper/CraftBukkit-Patches/0157-Fix-IP-banning.patch

23 lines
1.1 KiB
Diff
Raw Normal View History

From e70930bd5e41b82f5281b5faea46569be0985296 Mon Sep 17 00:00:00 2001
From: Thinkofdeath <thinkofdeath@spigotmc.org>
Date: Sat, 19 Jul 2014 22:13:44 +0100
Subject: [PATCH] Fix IP banning
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index ea9fcd9..75ea5c9 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -380,7 +380,7 @@ public abstract class PlayerList {
} else if (!this.isWhitelisted(gameprofile)) {
// return "You are not white-listed on this server!";
event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, org.spigotmc.SpigotConfig.whitelistMessage); // Spigot
- } else if (this.k.isBanned(socketaddress) && !this.k.get(gameprofile).hasExpired()) {
+ } else if (this.k.isBanned(socketaddress) && !this.k.get(socketaddress).hasExpired()) { // Spigot
IpBanEntry ipbanentry = this.k.get(socketaddress);
s = "Your IP address is banned from this server!\nReason: " + ipbanentry.getReason();
--
1.9.1