diff options
author | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-09-03 01:59:28 +0100 |
---|---|---|
committer | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-09-03 01:59:28 +0100 |
commit | 598be228001b288f6aa2a9590235390719ed9573 (patch) | |
tree | 2a8c54ed8adb8512867f5dadb748f9d0d68e898f /src/main/java | |
parent | 2547c46099539783db12f85cf4961b981650eaf8 (diff) | |
download | craftbukkit-598be228001b288f6aa2a9590235390719ed9573.tar craftbukkit-598be228001b288f6aa2a9590235390719ed9573.tar.gz craftbukkit-598be228001b288f6aa2a9590235390719ed9573.tar.lz craftbukkit-598be228001b288f6aa2a9590235390719ed9573.tar.xz craftbukkit-598be228001b288f6aa2a9590235390719ed9573.zip |
Implemented IP-banning methods
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/net/minecraft/server/ServerConfigurationManager.java | 2 | ||||
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/CraftServer.java | 13 |
2 files changed, 14 insertions, 1 deletions
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<String> getIPBans() { + return new HashSet(server.banByIP); + } + + public void banIP(String address) { + server.c(address); + } + + public void unbanIP(String address) { + server.d(address); + } } |