diff --git a/paper-api/src/main/java/org/bukkit/Bukkit.java b/paper-api/src/main/java/org/bukkit/Bukkit.java index ca1e537a73..9ad8de0899 100644 --- a/paper-api/src/main/java/org/bukkit/Bukkit.java +++ b/paper-api/src/main/java/org/bukkit/Bukkit.java @@ -3,6 +3,7 @@ package org.bukkit; import com.avaje.ebean.config.ServerConfig; import java.util.List; import java.util.Map; +import java.util.Set; import java.util.UUID; import java.util.logging.Logger; import org.bukkit.World.Environment; @@ -227,4 +228,16 @@ public final class Bukkit { public static OfflinePlayer getOfflinePlayer(String name) { return server.getOfflinePlayer(name); } + + public static Set getIPBans() { + return server.getIPBans(); + } + + public static void banIP(String address) { + server.banIP(address); + } + + public static void unbanIP(String address) { + server.unbanIP(address); + } } diff --git a/paper-api/src/main/java/org/bukkit/Server.java b/paper-api/src/main/java/org/bukkit/Server.java index 51b90f4ebe..036ec47ec3 100644 --- a/paper-api/src/main/java/org/bukkit/Server.java +++ b/paper-api/src/main/java/org/bukkit/Server.java @@ -7,6 +7,7 @@ import org.bukkit.inventory.Recipe; import java.util.List; import java.util.Map; +import java.util.Set; import java.util.UUID; import java.util.logging.Logger; import org.bukkit.command.PluginCommand; @@ -385,4 +386,25 @@ public interface Server { * @return OfflinePlayer object */ public OfflinePlayer getOfflinePlayer(String name); + + /** + * Gets a set containing all current IPs that are banned + * + * @return Set containing banned IP addresses + */ + public Set getIPBans(); + + /** + * Bans the specified address from the server + * + * @param address IP address to ban + */ + public void banIP(String address); + + /** + * Unbans the specified address from the server + * + * @param address IP address to unban + */ + public void unbanIP(String address); }