mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-22 16:41:46 +03:00
[FEATURE] ClientProfile Properties API (issue #433)
This commit is contained in:
parent
e2960393fb
commit
b8ca4daadf
1 changed files with 22 additions and 0 deletions
|
@ -71,6 +71,8 @@ public final class ClientProfile implements Comparable<ClientProfile> {
|
|||
// Client launcher
|
||||
@LauncherNetworkAPI
|
||||
private String mainClass;
|
||||
@LauncherNetworkAPI
|
||||
private final Map<String, String> properties = new HashMap<>();
|
||||
|
||||
public static class ServerProfile {
|
||||
public String name;
|
||||
|
@ -396,6 +398,26 @@ public void verify() {
|
|||
}
|
||||
}
|
||||
|
||||
public String getProperty(String name) {
|
||||
return properties.get(name);
|
||||
}
|
||||
|
||||
public void putProperty(String name, String value) {
|
||||
properties.put(name, value);
|
||||
}
|
||||
|
||||
public boolean containsProperty(String name) {
|
||||
return properties.containsKey(name);
|
||||
}
|
||||
|
||||
public void clearProperties() {
|
||||
properties.clear();
|
||||
}
|
||||
|
||||
public Map<String, String> getProperties() {
|
||||
return Collections.unmodifiableMap(properties);
|
||||
}
|
||||
|
||||
public enum Version {
|
||||
MC125("1.2.5", 29),
|
||||
MC147("1.4.7", 51),
|
||||
|
|
Loading…
Reference in a new issue