Remove deprecated ResourcePack constructor.

This commit is contained in:
Articdive 2022-01-05 15:37:49 +01:00 committed by TheMode
parent e468e027ba
commit 4b78e41ab4

View File

@ -15,15 +15,7 @@ public class ResourcePack {
private final boolean forced; private final boolean forced;
private final Component forcedMessage; private final Component forcedMessage;
/** private ResourcePack(@NotNull String url, @Nullable String hash, boolean forced, @Nullable Component forcedMessage) {
* @deprecated use {@link ResourcePack#optional(String, String)}.
*/
@Deprecated
public ResourcePack(@NotNull String url, @Nullable String hash) {
this(url, hash, false, null);
}
private ResourcePack(@NotNull String url, @Nullable String hash, boolean forced, Component forcedMessage) {
this.url = url; this.url = url;
// Optional, set to empty if null // Optional, set to empty if null
this.hash = hash == null ? "" : hash; this.hash = hash == null ? "" : hash;
@ -32,7 +24,7 @@ public class ResourcePack {
} }
public static ResourcePack optional(@NotNull String url, @Nullable String hash) { public static ResourcePack optional(@NotNull String url, @Nullable String hash) {
return new ResourcePack(url, hash); return new ResourcePack(url, hash, false, null);
} }
public static ResourcePack forced(@NotNull String url, @Nullable String hash, @Nullable Component forcedMessage) { public static ResourcePack forced(@NotNull String url, @Nullable String hash, @Nullable Component forcedMessage) {