mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-27 03:27:56 +01:00
Remove deprecated ResourcePack constructor.
This commit is contained in:
parent
e468e027ba
commit
4b78e41ab4
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user