Add support for WorldGuard on built-in server, fix getNodes() on new

ConfigurationNode class
This commit is contained in:
Mike Primm 2011-05-18 23:29:33 -05:00
parent a7ba34065b
commit 26f4f7d994
5 changed files with 95 additions and 5 deletions

View file

@ -132,10 +132,11 @@ public class ConfigurationNode implements Map<String, Object> {
}
public List<ConfigurationNode> getNodes(String path) {
Object o = getObject(path);
if (!(o instanceof List<?>)) {
List<Object> o = getList(path);
if(o == null)
return new ArrayList<ConfigurationNode>();
}
ArrayList<ConfigurationNode> nodes = new ArrayList<ConfigurationNode>();
for(Object i : (List<?>)o) {
if (i instanceof Map<?, ?>) {