[FEATURE] ClientProfile Properties API (issue #433)

This commit is contained in:
Gravita 2021-01-28 19:08:44 +07:00
parent e2960393fb
commit b8ca4daadf

View file

@ -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),