diff --git a/paper-api/src/main/java/org/bukkit/util/config/ConfigurationNode.java b/paper-api/src/main/java/org/bukkit/util/config/ConfigurationNode.java index 583d35b6c2..77dad4d37c 100644 --- a/paper-api/src/main/java/org/bukkit/util/config/ConfigurationNode.java +++ b/paper-api/src/main/java/org/bukkit/util/config/ConfigurationNode.java @@ -24,27 +24,8 @@ public class ConfigurationNode { * * @return A map of key value pairs with the path as the key and the object as the value */ - @SuppressWarnings("unchecked") public Map getAll() { - Map map = new TreeMap(); - - Set keys = root.keySet(); - for( String k : keys ) { - Object tmp = root.get(k); - if( tmp instanceof Map ) { - Map rec = recursiveBuilder((Map ) tmp); - - Set subkeys = rec.keySet(); - for( String sk : subkeys ) { - map.put(k + "." + sk, rec.get(sk)); - } - } - else { - map.put(k, tmp); - } - } - - return map; + return recursiveBuilder(root); } /**