Changed the way templates and world-configuration are handled.

This commit is contained in:
FrozenCow 2011-05-24 02:13:43 +02:00
parent de0ad58344
commit 108e9d24c4
8 changed files with 174 additions and 148 deletions

View file

@ -5,6 +5,8 @@ import java.util.Date;
import java.util.Map;
import org.dynmap.DynmapPlugin;
import org.dynmap.DynmapWorld;
import org.dynmap.Event;
import org.dynmap.web.HttpHandler;
import org.dynmap.web.HttpRequest;
import org.dynmap.web.HttpResponse;
@ -16,6 +18,12 @@ public class ClientConfigurationHandler implements HttpHandler {
private byte[] cachedConfiguration = null;
public ClientConfigurationHandler(DynmapPlugin plugin) {
this.plugin = plugin;
plugin.events.addListener("worldactivated", new Event.Listener<DynmapWorld>() {
@Override
public void triggered(DynmapWorld t) {
cachedConfiguration = null;
}
});
}
@Override
public void handle(String path, HttpRequest request, HttpResponse response) throws Exception {