Fixed allowwebchat for JsonFile.
This commit is contained in:
parent
c2e3cbc793
commit
77009bcffb
1 changed files with 3 additions and 1 deletions
|
|
@ -28,12 +28,13 @@ public class JsonFileClientUpdateComponent extends ClientUpdateComponent {
|
||||||
protected JSONParser parser = new JSONParser();
|
protected JSONParser parser = new JSONParser();
|
||||||
public JsonFileClientUpdateComponent(final DynmapPlugin plugin, final ConfigurationNode configuration) {
|
public JsonFileClientUpdateComponent(final DynmapPlugin plugin, final ConfigurationNode configuration) {
|
||||||
super(plugin, configuration);
|
super(plugin, configuration);
|
||||||
|
final boolean allowwebchat = configuration.getBoolean("allowwebchat", false);
|
||||||
jsonInterval = (long)(configuration.getFloat("writeinterval", 1) * 1000);
|
jsonInterval = (long)(configuration.getFloat("writeinterval", 1) * 1000);
|
||||||
task = new TimerTask() {
|
task = new TimerTask() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
writeUpdates();
|
writeUpdates();
|
||||||
if (configuration.getBoolean("allowwebchat", false)) {
|
if (allowwebchat) {
|
||||||
handleWebChat();
|
handleWebChat();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -44,6 +45,7 @@ public class JsonFileClientUpdateComponent extends ClientUpdateComponent {
|
||||||
@Override
|
@Override
|
||||||
public void triggered(JSONObject t) {
|
public void triggered(JSONObject t) {
|
||||||
s(t, "jsonfile", true);
|
s(t, "jsonfile", true);
|
||||||
|
s(t, "allowwebchat", allowwebchat);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
plugin.events.addListener("initialized", new Event.Listener<Object>() {
|
plugin.events.addListener("initialized", new Event.Listener<Object>() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue