From 598be228001b288f6aa2a9590235390719ed9573 Mon Sep 17 00:00:00 2001 From: Dinnerbone Date: Sat, 3 Sep 2011 01:59:28 +0100 Subject: Implemented IP-banning methods --- .../net/minecraft/server/ServerConfigurationManager.java | 2 +- src/main/java/org/bukkit/craftbukkit/CraftServer.java | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'src/main/java') diff --git a/src/main/java/net/minecraft/server/ServerConfigurationManager.java b/src/main/java/net/minecraft/server/ServerConfigurationManager.java index 197a19f7..977b2993 100644 --- a/src/main/java/net/minecraft/server/ServerConfigurationManager.java +++ b/src/main/java/net/minecraft/server/ServerConfigurationManager.java @@ -34,7 +34,7 @@ public class ServerConfigurationManager { // private PlayerManager[] d = new PlayerManager[2]; // CraftBukkit - removed public int maxPlayers; // CraftBukkit - private -> public private Set banByName = new HashSet(); - private Set banByIP = new HashSet(); + public Set banByIP = new HashSet(); // CraftBukkit - private -> public private Set h = new HashSet(); private Set i = new HashSet(); private File j; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java index 8821739b..ef086374 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -22,6 +22,7 @@ import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.util.ArrayList; +import java.util.HashSet; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; @@ -816,4 +817,16 @@ public final class CraftServer implements Server { return result; } + + public Set getIPBans() { + return new HashSet(server.banByIP); + } + + public void banIP(String address) { + server.c(address); + } + + public void unbanIP(String address) { + server.d(address); + } } -- cgit v1.2.3