9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-25 18:09:17 +00:00

Fix build

This commit is contained in:
Dreeam
2025-03-25 03:29:15 -04:00
parent cbcc54726a
commit 2c7cb52e6b
13 changed files with 15 additions and 41 deletions

View File

@@ -94,6 +94,16 @@ public class LeafGlobalConfig {
return configFile.getInteger(path, def);
}
public long getLong(String path, long def, String comment) {
configFile.addDefault(path, def, comment);
return configFile.getLong(path, def);
}
public long getLong(String path, long def) {
configFile.addDefault(path, def);
return configFile.getLong(path, def);
}
public List<String> getList(String path, List<String> def, String comment) {
configFile.addDefault(path, def, comment);
return configFile.getStringList(path);
@@ -122,7 +132,6 @@ public class LeafGlobalConfig {
public Boolean getBoolean(String path) {
String value = configFile.getString(path, null);
return value == null ? null : Boolean.parseBoolean(value);
}
@@ -132,16 +141,19 @@ public class LeafGlobalConfig {
public Double getDouble(String path) {
String value = configFile.getString(path, null);
return value == null ? null : Double.parseDouble(value); // TODO: Need to check whether need to handle NFE correctly
}
public Integer getInt(String path) {
String value = configFile.getString(path, null);
return value == null ? null : Integer.parseInt(value); // TODO: Need to check whether need to handle NFE correctly
}
public Long getLong(String path) {
String value = configFile.getString(path, null);
return value == null ? null : Long.parseLong(value); // TODO: Need to check whether need to handle NFE correctly
}
public List<String> getList(String path) {
return configFile.getList(path, null);
}
@@ -177,19 +189,4 @@ public class LeafGlobalConfig {
public String pickStringRegionBased(String en, String cn) {
return isCN ? cn : en;
}
public long getLong(String path, long def, String comment) {
configFile.addDefault(path, def, comment);
return configFile.getLong(path, def);
}
public long getLong(String path, long def) {
configFile.addDefault(path, def);
return configFile.getLong(path, def);
}
public Long getLong(String path) {
String value = configFile.getString(path, null);
return value == null ? null : Long.parseLong(value);
}
}