diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/triggers/ArchTrigger.java b/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/triggers/ArchTrigger.java new file mode 100644 index 00000000..1222af88 --- /dev/null +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/triggers/ArchTrigger.java @@ -0,0 +1,12 @@ +package pro.gravit.launcher.profiles.optional.triggers; + +import pro.gravit.launcher.profiles.optional.OptionalFile; +import pro.gravit.utils.helper.JVMHelper; + +public class ArchTrigger extends OptionalTrigger { + public JVMHelper.ARCH arch; + @Override + protected boolean isTriggered(OptionalFile optional, OptionalTriggerContext context) { + return context.getJavaVersion().arch == arch; + } +} diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/triggers/OptionalTrigger.java b/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/triggers/OptionalTrigger.java index f47d334d..8ba54011 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/triggers/OptionalTrigger.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/triggers/OptionalTrigger.java @@ -13,6 +13,7 @@ public static void registerProviders() { if (!isRegisteredProviders) { providers.register("java", JavaTrigger.class); providers.register("os", OSTrigger.class); + providers.register("arch", ArchTrigger.class); isRegisteredProviders = true; } }