[FEATURE] ArchTrigger

This commit is contained in:
Gravita 2022-09-04 16:18:33 +07:00
parent b43ff9e7a6
commit 970761374a
2 changed files with 13 additions and 0 deletions

View file

@ -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;
}
}

View file

@ -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;
}
}