mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 00:51:01 +03:00
[FEATURE] ArchTrigger
This commit is contained in:
parent
b43ff9e7a6
commit
970761374a
2 changed files with 13 additions and 0 deletions
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -13,6 +13,7 @@ public static void registerProviders() {
|
||||||
if (!isRegisteredProviders) {
|
if (!isRegisteredProviders) {
|
||||||
providers.register("java", JavaTrigger.class);
|
providers.register("java", JavaTrigger.class);
|
||||||
providers.register("os", OSTrigger.class);
|
providers.register("os", OSTrigger.class);
|
||||||
|
providers.register("arch", ArchTrigger.class);
|
||||||
isRegisteredProviders = true;
|
isRegisteredProviders = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue