mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-05 18:27:17 +01:00
Implemented IP-banning methods
By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
parent
d1c68e10a9
commit
df08315cf4
1 changed files with 13 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue