Implemented IP-banning methods

This commit is contained in:
Dinnerbone 2011-09-03 01:59:28 +01:00
parent 2547c46099
commit 598be22800
2 changed files with 14 additions and 1 deletions

View File

@ -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;

View File

@ -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);
}
}