diff --git a/configuration.txt b/configuration.txt index 740f120a..ec727650 100644 --- a/configuration.txt +++ b/configuration.txt @@ -15,6 +15,7 @@ components: # sendhealth: true # sendposition: true # allowwebchat: false + # webchat-interval: 5 # hidewebchatip: false - class: org.dynmap.SimpleWebChatComponent diff --git a/src/main/java/org/dynmap/JsonFileClientUpdateComponent.java b/src/main/java/org/dynmap/JsonFileClientUpdateComponent.java index 737db67b..6f4980f1 100644 --- a/src/main/java/org/dynmap/JsonFileClientUpdateComponent.java +++ b/src/main/java/org/dynmap/JsonFileClientUpdateComponent.java @@ -57,6 +57,9 @@ public class JsonFileClientUpdateComponent extends ClientUpdateComponent { public void triggered(JSONObject t) { s(t, "jsonfile", true); s(t, "allowwebchat", allowwebchat); + + // For 'sendmessage.php' + s(t, "webchat-interval", configuration.getFloat("webchat-interval", 5.0f)); } }); plugin.events.addListener("initialized", new Event.Listener() {