mirror of
https://github.com/songoda/SongodaCore.git
synced 2025-01-24 08:11:24 +01:00
config update
This commit is contained in:
parent
8e56c3fb8b
commit
0ec3530cc9
@ -34,7 +34,10 @@ public class Category {
|
||||
}
|
||||
|
||||
public Setting getSetting(String setting) {
|
||||
return settings.get(setting);
|
||||
for (String string : settings.keySet())
|
||||
if (string.equalsIgnoreCase(setting))
|
||||
return settings.get(string);
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getKey() {
|
||||
|
@ -32,12 +32,15 @@ public class Config {
|
||||
}
|
||||
|
||||
public Category getCategory(String key) {
|
||||
return categories.get(key);
|
||||
for (String string : categories.keySet())
|
||||
if (string.equalsIgnoreCase(key))
|
||||
return categories.get(string);
|
||||
return null;
|
||||
}
|
||||
|
||||
public Setting getSetting(String key) {
|
||||
String[] split = key.split(".", 2);
|
||||
Category category = categories.get(split[0]);
|
||||
Category category = getCategory(split[0]);
|
||||
return category.getSetting(split[1]);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user