diff --git a/paper-api/src/main/java/org/bukkit/BanList.java b/paper-api/src/main/java/org/bukkit/BanList.java index 87f4925235..ce35cf91d4 100644 --- a/paper-api/src/main/java/org/bukkit/BanList.java +++ b/paper-api/src/main/java/org/bukkit/BanList.java @@ -86,13 +86,23 @@ public interface BanList { @Nullable public BanEntry addBan(@NotNull T target, @Nullable String reason, @Nullable Date expires, @Nullable String source); + /** + * Gets a set containing every {@link BanEntry} in this list. + * + * @return an immutable set containing every entry tracked by this list + * @deprecated This return a generic class, prefer use {@link #getEntries()} + */ + @Deprecated + @NotNull + public Set getBanEntries(); + /** * Gets a set containing every {@link BanEntry} in this list. * * @return an immutable set containing every entry tracked by this list */ @NotNull - public Set> getBanEntries(); + public Set> getEntries(); /** * Gets if a {@link BanEntry} exists for the target, indicating an active diff --git a/paper-api/src/main/java/org/bukkit/Bukkit.java b/paper-api/src/main/java/org/bukkit/Bukkit.java index 3ee2874c7d..d0532011ad 100644 --- a/paper-api/src/main/java/org/bukkit/Bukkit.java +++ b/paper-api/src/main/java/org/bukkit/Bukkit.java @@ -4,7 +4,7 @@ import com.google.common.collect.ImmutableList; import java.awt.image.BufferedImage; import java.io.File; import java.io.Serializable; -import java.net.InetSocketAddress; +import java.net.InetAddress; import java.util.Collection; import java.util.Collections; import java.util.Iterator; @@ -1208,7 +1208,7 @@ public final class Bukkit { * * @param address the IP address to ban * - * @deprecated see {@link #banIP(InetSocketAddress)} + * @deprecated see {@link #banIP(InetAddress)} */ @Deprecated public static void banIP(@NotNull String address) { @@ -1220,7 +1220,7 @@ public final class Bukkit { * * @param address the IP address to unban * - * @deprecated see {@link #unbanIP(InetSocketAddress)} + * @deprecated see {@link #unbanIP(InetAddress)} */ @Deprecated public static void unbanIP(@NotNull String address) { @@ -1232,7 +1232,7 @@ public final class Bukkit { * * @param address the IP address to ban */ - public static void banIP(@NotNull InetSocketAddress address) { + public static void banIP(@NotNull InetAddress address) { server.banIP(address); } @@ -1241,7 +1241,7 @@ public final class Bukkit { * * @param address the IP address to unban */ - public static void unbanIP(@NotNull InetSocketAddress address) { + public static void unbanIP(@NotNull InetAddress 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 32528060b9..e0df925316 100644 --- a/paper-api/src/main/java/org/bukkit/Server.java +++ b/paper-api/src/main/java/org/bukkit/Server.java @@ -4,7 +4,7 @@ import com.google.common.collect.ImmutableList; import java.awt.image.BufferedImage; import java.io.File; import java.io.Serializable; -import java.net.InetSocketAddress; +import java.net.InetAddress; import java.util.Collection; import java.util.Collections; import java.util.Iterator; @@ -1028,7 +1028,7 @@ public interface Server extends PluginMessageRecipient { * * @param address the IP address to ban * - * @deprecated see {@link #banIP(InetSocketAddress)} + * @deprecated see {@link #banIP(InetAddress)} */ @Deprecated public void banIP(@NotNull String address); @@ -1038,7 +1038,7 @@ public interface Server extends PluginMessageRecipient { * * @param address the IP address to unban * - * @deprecated see {@link #unbanIP(InetSocketAddress)} + * @deprecated see {@link #unbanIP(InetAddress)} */ @Deprecated public void unbanIP(@NotNull String address); @@ -1048,14 +1048,14 @@ public interface Server extends PluginMessageRecipient { * * @param address the IP address to ban */ - public void banIP(@NotNull InetSocketAddress address); + public void banIP(@NotNull InetAddress address); /** * Unbans the specified address from the server. * * @param address the IP address to unban */ - public void unbanIP(@NotNull InetSocketAddress address); + public void unbanIP(@NotNull InetAddress address); /** * Gets a set containing all banned players. diff --git a/paper-api/src/main/java/org/bukkit/ban/IpBanList.java b/paper-api/src/main/java/org/bukkit/ban/IpBanList.java index b17bba82ff..f024b67ad7 100644 --- a/paper-api/src/main/java/org/bukkit/ban/IpBanList.java +++ b/paper-api/src/main/java/org/bukkit/ban/IpBanList.java @@ -1,11 +1,11 @@ package org.bukkit.ban; -import java.net.InetSocketAddress; +import java.net.InetAddress; import org.bukkit.BanList; /** * A {@link BanList} targeting IP bans. */ -public interface IpBanList extends BanList { +public interface IpBanList extends BanList { } diff --git a/paper-api/src/main/java/org/bukkit/entity/Player.java b/paper-api/src/main/java/org/bukkit/entity/Player.java index b41503ab1d..17daf36633 100644 --- a/paper-api/src/main/java/org/bukkit/entity/Player.java +++ b/paper-api/src/main/java/org/bukkit/entity/Player.java @@ -1,5 +1,6 @@ package org.bukkit.entity; +import java.net.InetAddress; import java.net.InetSocketAddress; import java.util.Collection; import java.util.Date; @@ -204,7 +205,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * (updated) previous ban */ @Nullable - public BanEntry banIp(@Nullable String reason, @Nullable Date expires, @Nullable String source, boolean kickPlayer); + public BanEntry banIp(@Nullable String reason, @Nullable Date expires, @Nullable String source, boolean kickPlayer); /** * Says a message (or runs a command).