[FEATURE] Add OptionalMod.getDependencies()

This commit is contained in:
Gravita 2024-11-24 15:30:14 +07:00
parent f1559183a1
commit f946c893e1
No known key found for this signature in database
GPG key ID: 543A8F335C9CD633
2 changed files with 8 additions and 0 deletions

View file

@ -6,6 +6,7 @@
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
import java.util.Set;
public class OptionalFile implements ProfileFeatureAPI.OptionalMod { public class OptionalFile implements ProfileFeatureAPI.OptionalMod {
@LauncherNetworkAPI @LauncherNetworkAPI
@ -72,6 +73,11 @@ public boolean isVisible() {
return visible; return visible;
} }
@Override
public Set<ProfileFeatureAPI.OptionalMod> getDependencies() {
return Set.of(dependencies);
}
public boolean isMark() { public boolean isMark() {
return mark; return mark;
} }

View file

@ -4,6 +4,7 @@
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set;
import java.util.UUID; import java.util.UUID;
import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletableFuture;
@ -37,5 +38,6 @@ interface OptionalMod {
String getDescription(); String getDescription();
String getCategory(); String getCategory();
boolean isVisible(); boolean isVisible();
Set<OptionalMod> getDependencies();
} }
} }