Check the right banlist for ip bans

This commit is contained in:
Thinkofdeath 2014-05-07 23:34:41 +01:00
parent 531071af97
commit 6d0b39bc76
1 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,22 @@
From 326d13051cea60336e4ab939f36aedadd1629e24 Mon Sep 17 00:00:00 2001
From: Thinkofdeath <thethinkofdeath@gmail.com>
Date: Wed, 7 May 2014 23:33:46 +0100
Subject: [PATCH] Check the right banlist for ip bans
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index bbef888..a4a59ee 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.j.get(gameprofile).e()) { // Should be hasExpired
+ } else if (this.k.isBanned(socketaddress) && !this.k.get(socketaddress).e()) { // Should be hasExpired // Spigot - check the right list
IpBanEntry ipbanentry = this.k.get(socketaddress);
s = "Your IP address is banned from this server!\nReason: " + ipbanentry.getReason();
--
1.9.1