#1227: Refinements to new ban API for improved compatibility and correctness
By: Doc <nachito94@msn.com>
This commit is contained in:
@@ -23,6 +23,7 @@ import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.InetAddress;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
@@ -1721,14 +1722,14 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void banIP(InetSocketAddress address) {
|
||||
public void banIP(InetAddress address) {
|
||||
Preconditions.checkArgument(address != null, "Address cannot be null.");
|
||||
|
||||
((CraftIpBanList) this.getBanList(BanList.Type.IP)).addBan(address, null, null, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unbanIP(InetSocketAddress address) {
|
||||
public void unbanIP(InetAddress address) {
|
||||
Preconditions.checkArgument(address != null, "Address cannot be null.");
|
||||
|
||||
((CraftIpBanList) this.getBanList(BanList.Type.IP)).pardon(address);
|
||||
|
||||
Reference in New Issue
Block a user