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:
Ursprung
2547c46099
Commit
598be22800
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren