From 15489833df11d2e396c43e23a17282aab35d962b Mon Sep 17 00:00:00 2001 From: FrozenCow Date: Sun, 22 May 2011 17:46:11 +0200 Subject: [PATCH] Fixed allowwebchat for JsonFile. --- src/main/java/org/dynmap/JsonFileClientUpdateComponent.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/dynmap/JsonFileClientUpdateComponent.java b/src/main/java/org/dynmap/JsonFileClientUpdateComponent.java index 2985967e..748755b9 100644 --- a/src/main/java/org/dynmap/JsonFileClientUpdateComponent.java +++ b/src/main/java/org/dynmap/JsonFileClientUpdateComponent.java @@ -28,12 +28,13 @@ public class JsonFileClientUpdateComponent extends ClientUpdateComponent { protected JSONParser parser = new JSONParser(); public JsonFileClientUpdateComponent(final DynmapPlugin plugin, final ConfigurationNode configuration) { super(plugin, configuration); + final boolean allowwebchat = configuration.getBoolean("allowwebchat", false); jsonInterval = (long)(configuration.getFloat("writeinterval", 1) * 1000); task = new TimerTask() { @Override public void run() { writeUpdates(); - if (configuration.getBoolean("allowwebchat", false)) { + if (allowwebchat) { handleWebChat(); } } @@ -44,6 +45,7 @@ public class JsonFileClientUpdateComponent extends ClientUpdateComponent { @Override public void triggered(JSONObject t) { s(t, "jsonfile", true); + s(t, "allowwebchat", allowwebchat); } }); plugin.events.addListener("initialized", new Event.Listener() {