1
0
Fork 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
1 changed files with 4 additions and 7 deletions

View File

@ -37,8 +37,10 @@ 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);
}