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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
/*
* Copyright (C) 2024 NotEnoughUpdates contributors
*
* This file is part of NotEnoughUpdates.
*
* NotEnoughUpdates is free software: you can redistribute it
* and/or modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation, either
* version 3 of the License, or (at your option) any later version.
*
* NotEnoughUpdates is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with NotEnoughUpdates. If not, see <https://www.gnu.org/licenses/>.
*/
package io.github.moulberry.notenoughupdates.options.separatesections;
import com.google.gson.annotations.Expose;
import io.github.moulberry.moulconfig.annotations.Accordion;
import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean;
import io.github.moulberry.moulconfig.annotations.ConfigEditorButton;
import io.github.moulberry.moulconfig.annotations.ConfigEditorDropdown;
import io.github.moulberry.moulconfig.annotations.ConfigOption;
import io.github.moulberry.moulconfig.observer.Property;
import io.github.moulberry.notenoughupdates.options.customtypes.ConfigVersionDisplay;
import io.github.moulberry.notenoughupdates.util.Utils;
public class About {
@ConfigOption(name = "Current Version", desc = "This is the NEU version you are running currently")
@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 = "Update Stream", desc = "How often do you want to get updates")
@Expose
@ConfigEditorDropdown
public Property<UpdateStream> updateStream = Property.of(UpdateStream.FULL);
@ConfigOption(name = "Used Software", desc = "Information about used software and licenses")
@Accordion
@Expose
public Licenses licenses = new Licenses();
public enum UpdateStream {
PRE("Full Releases and Beta", "pre"), FULL("Full Releases", "full"), NONE("None", "none");
public final String stream;
public final String label;
UpdateStream(String name, String stream) {
this.label = name;
this.stream = stream;
}
@Override
public String toString() {
return label;
}
}
public static class Licenses {
@ConfigOption(name = "Forge", desc = "Forge is available under the LGPL 3.0 license")
@ConfigEditorButton(buttonText = "Source")
public Runnable forge = () -> Utils.openUrl("https://github.com/MinecraftForge/MinecraftForge");
@ConfigOption(name = "Mixin", desc = "Mixin is available under the MIT license")
@ConfigEditorButton(buttonText = "Source")
public Runnable mixin = () -> Utils.openUrl("https://github.com/SpongePowered/Mixin/");
@ConfigOption(name = "LibAutoUpdate", desc = "LibAutoUpdate is available under the BSD 2 Clause license")
@ConfigEditorButton(buttonText = "Source")
public Runnable libAutoUpdate = () -> Utils.openUrl("https://git.nea.moe/nea/libautoupdate/");
@ConfigOption(name = "Kotlin", desc = "Kotlin is available under the Apache 2 license")
@ConfigEditorButton(buttonText = "Source")
public Runnable kotlin = () -> Utils.openUrl("https://github.com/jetbrains/kotlin/");
@ConfigOption(name = "AutoService", desc = "auto-service-ksp is available under the Apache 2 license")
@ConfigEditorButton(buttonText = "Source")
public Runnable autoService = () -> Utils.openUrl("https://github.com/ZacSweers/auto-service-ksp/");
@ConfigOption(name = "Brigadier", desc = "Brigadier is available under the MIT license")
@ConfigEditorButton(buttonText = "Source")
public Runnable brigadier = () -> Utils.openUrl("https://github.com/Mojang/brigadier/");
@ConfigOption(name = "JB Annotations", desc = "Jetbrains annotations is available under the Apache 2 license")
@ConfigEditorButton(buttonText = "Source")
public Runnable annotations = () -> Utils.openUrl("https://github.com/JetBrains/java-annotations");
@ConfigOption(name = "MoulConfig", desc = "MoulConfig is available under the LGPL 3.0 license")
@ConfigEditorButton(buttonText = "Source")
public Runnable moulConfig = () -> Utils.openUrl("https://github.com/NotEnoughUpdates/MoulConfig");
@ConfigOption(name = "Bliki", desc = "Bliki Core is available under the Eclipse Public License 1.0 license")
@ConfigEditorButton(buttonText = "Source")
public Runnable blikiCore = () -> Utils.openUrl("https://github.com/AaronZhangL/blikiCore/");
@ConfigOption(name = "Lombok", desc = "Lombok is available under the MIT license")
@ConfigEditorButton(buttonText = "Website")
public Runnable lombok = () -> Utils.openUrl("https://projectlombok.org/");
}
}
|