1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
package at.hannibal2.skyhanni.config.features;
import at.hannibal2.skyhanni.config.FeatureToggle;
import at.hannibal2.skyhanni.features.misc.update.ConfigVersionDisplay;
import at.hannibal2.skyhanni.utils.OSUtils;
import com.google.gson.annotations.Expose;
import io.github.notenoughupdates.moulconfig.annotations.Accordion;
import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorBoolean;
import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorButton;
import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorDropdown;
import io.github.notenoughupdates.moulconfig.annotations.ConfigOption;
import io.github.notenoughupdates.moulconfig.observer.Property;
public class About {
@ConfigOption(name = "Current Version", desc = "This is the SkyHanni version you are currently running")
@ConfigVersionDisplay
public transient Void currentVersion = null;
@ConfigOption(name = "Check for Updates", desc = "Automatically check for updates on each startup")
@Expose
@ConfigEditorBoolean
public boolean autoUpdates = true;
@ConfigOption(name = "Auto Updates", desc = "Automatically download new version on each startup")
@Expose
@FeatureToggle
@ConfigEditorBoolean
public boolean fullAutoUpdates = false;
@ConfigOption(name = "Update Stream", desc = "How frequently you want updates for SkyHanni")
@Expose
@ConfigEditorDropdown
public Property<UpdateStream> updateStream = Property.of(UpdateStream.RELEASES);
@ConfigOption(name = "Used Software", desc = "Information about used software and licenses")
@Accordion
@Expose
public Licenses licenses = new Licenses();
public enum UpdateStream {
NONE("None", "none"),
BETA("Beta", "pre"),
RELEASES("Full", "full");
private final String label;
private final String stream;
UpdateStream(String label, String stream) {
this.label = label;
this.stream = stream;
}
public String getStream() {
return stream;
}
@Override
public String toString() {
return label;
}
}
public static class Licenses {
@ConfigOption(name = "MoulConfig", desc = "MoulConfig is available under the LGPL 3.0 License or later version")
@ConfigEditorButton(buttonText = "Source")
public Runnable moulConfig = () -> OSUtils.openBrowser("https://github.com/NotEnoughUpdates/MoulConfig");
@ConfigOption(name = "NotEnoughUpdates", desc = "NotEnoughUpdates is available under the LGPL 3.0 License or later version")
@ConfigEditorButton(buttonText = "Source")
public Runnable notEnoughUpdates = () -> OSUtils.openBrowser("https://github.com/NotEnoughUpdates/NotEnoughUpdates");
@ConfigOption(name = "Forge", desc = "Forge is available under the LGPL 3.0 license")
@ConfigEditorButton(buttonText = "Source")
public Runnable forge = () -> OSUtils.openBrowser("https://github.com/MinecraftForge/MinecraftForge");
@ConfigOption(name = "LibAutoUpdate", desc = "LibAutoUpdate is available under the BSD 2 Clause License")
@ConfigEditorButton(buttonText = "Source")
public Runnable libAutoUpdate = () -> OSUtils.openBrowser("https://git.nea.moe/nea/libautoupdate/");
@ConfigOption(name = "Mixin", desc = "Mixin is available under the MIT License")
@ConfigEditorButton(buttonText = "Source")
public Runnable mixin = () -> OSUtils.openBrowser("https://github.com/SpongePowered/Mixin/");
@ConfigOption(name = "DiscordIPC", desc = "DiscordIPC is available under the Apache License 2.0")
@ConfigEditorButton(buttonText = "GitHub")
public Runnable discordRPC = () -> OSUtils.openBrowser("https://github.com/jagrosh/DiscordIPC");
}
}
|