1
0

Add config value for IPHub.info API key

This commit is contained in:
Ryan Fox 2020-10-21 22:47:24 +00:00
parent 5e0cbb265b
commit 0778e579d0
Signed by: flewkey
GPG Key ID: 94F56ADFD848851E

View File

@ -37,7 +37,9 @@ public class Config {
setDefault("disableTntExplosions", false);
setDefault("disableRespawnAnchorExplosions", false);
setDefault("iphubApiKey", "");
setDefault("spawn", (new PlayerPosition()).getJSON());
saveConfig();
LOGGER.info("Configuration loaded");
}
@ -89,12 +91,7 @@ public class Config {
saveConfig();
}
public static void setDefault(String key, JSONArray data) {
if (!json.has(key))
json.put(key, data);
}
public static void setDefault(String key, Boolean data) {
public static void setDefault(String key, Object data) {
if (!json.has(key))
json.put(key, data);
}