From c3f006286223a51db06881e2e0617200038809b7 Mon Sep 17 00:00:00 2001 From: FrozenCow Date: Thu, 19 May 2011 11:14:46 +0200 Subject: [PATCH] Fixed ConfigurationNode. --- src/main/java/org/dynmap/ConfigurationNode.java | 2 +- src/main/java/org/dynmap/DynmapPlugin.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/dynmap/ConfigurationNode.java b/src/main/java/org/dynmap/ConfigurationNode.java index 4d8e3f10..315b9fbf 100644 --- a/src/main/java/org/dynmap/ConfigurationNode.java +++ b/src/main/java/org/dynmap/ConfigurationNode.java @@ -27,7 +27,7 @@ public class ConfigurationNode implements Map { int separator = path.indexOf('/'); if (separator < 0) return get(path); - String localKey = path.substring(0, separator - 1); + String localKey = path.substring(0, separator); Object subvalue = get(localKey); if (subvalue == null) return null; diff --git a/src/main/java/org/dynmap/DynmapPlugin.java b/src/main/java/org/dynmap/DynmapPlugin.java index 96d5ad9d..c95cb24f 100644 --- a/src/main/java/org/dynmap/DynmapPlugin.java +++ b/src/main/java/org/dynmap/DynmapPlugin.java @@ -143,7 +143,7 @@ public class DynmapPlugin extends JavaPlugin { webServer.handlers.put("/up/", new ClientUpdateHandler(mapManager, playerList, getServer(), configuration.getBoolean("health-in-json", false))); webServer.handlers.put("/up/configuration", new ClientConfigurationHandler(configuration.getNode("web"))); /* See if regions configuration branch is present */ - for(ConfigurationNode type : configuration.getNode("web").getNodes("components")) { + for(ConfigurationNode type : configuration.getNodes("web/components")) { if(type.getString("type").equalsIgnoreCase("regions")) { String fname = type.getString("filename", "regions.yml"); fname = "/standalone/" + fname.substring(0, fname.lastIndexOf('.')) + "_"; /* Find our path base */