From f946c893e113316a3dffbc1bc1ed29a66683b8ab Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Sun, 24 Nov 2024 15:30:14 +0700 Subject: [PATCH] [FEATURE] Add OptionalMod.getDependencies() --- .../launcher/base/profiles/optional/OptionalFile.java | 6 ++++++ .../launcher/core/api/features/ProfileFeatureAPI.java | 2 ++ 2 files changed, 8 insertions(+) diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/OptionalFile.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/OptionalFile.java index bf8e261c..d16a13a8 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/OptionalFile.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/OptionalFile.java @@ -6,6 +6,7 @@ import java.util.List; import java.util.Objects; +import java.util.Set; public class OptionalFile implements ProfileFeatureAPI.OptionalMod { @LauncherNetworkAPI @@ -72,6 +73,11 @@ public boolean isVisible() { return visible; } + @Override + public Set getDependencies() { + return Set.of(dependencies); + } + public boolean isMark() { return mark; } diff --git a/LauncherCore/src/main/java/pro/gravit/launcher/core/api/features/ProfileFeatureAPI.java b/LauncherCore/src/main/java/pro/gravit/launcher/core/api/features/ProfileFeatureAPI.java index afd541bf..ddf7d032 100644 --- a/LauncherCore/src/main/java/pro/gravit/launcher/core/api/features/ProfileFeatureAPI.java +++ b/LauncherCore/src/main/java/pro/gravit/launcher/core/api/features/ProfileFeatureAPI.java @@ -4,6 +4,7 @@ import java.util.List; import java.util.Map; +import java.util.Set; import java.util.UUID; import java.util.concurrent.CompletableFuture; @@ -37,5 +38,6 @@ interface OptionalMod { String getDescription(); String getCategory(); boolean isVisible(); + Set getDependencies(); } }