3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-18 20:40:08 +01:00

Implemented IP-banning methods

Dieser Commit ist enthalten in:
Dinnerbone 2011-09-03 01:59:28 +01:00
Ursprung 2547c46099
Commit 598be22800
2 geänderte Dateien mit 14 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -34,7 +34,7 @@ public class ServerConfigurationManager {
// private PlayerManager[] d = new PlayerManager[2]; // CraftBukkit - removed // private PlayerManager[] d = new PlayerManager[2]; // CraftBukkit - removed
public int maxPlayers; // CraftBukkit - private -> public public int maxPlayers; // CraftBukkit - private -> public
private Set banByName = new HashSet(); 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 h = new HashSet();
private Set i = new HashSet(); private Set i = new HashSet();
private File j; private File j;

Datei anzeigen

@ -22,6 +22,7 @@ import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashSet;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -816,4 +817,16 @@ public final class CraftServer implements Server {
return result; 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);
}
} }