diff --git a/src/main/java/org/dynmap/ClientConfigurationComponent.java b/src/main/java/org/dynmap/ClientConfigurationComponent.java index 51f3f9f7..8e93fcd6 100644 --- a/src/main/java/org/dynmap/ClientConfigurationComponent.java +++ b/src/main/java/org/dynmap/ClientConfigurationComponent.java @@ -21,6 +21,7 @@ public class ClientConfigurationComponent extends Component { s(t, "webprefix", unescapeString(c.getString("webprefix", "[WEB] "))); s(t, "defaultzoom", c.getInteger("defaultzoom", 0)); s(t, "sidebaropened", c.getString("sidebaropened", "false")); + s(t, "dynmapversion", plugin.getDescription().getVersion()); DynmapWorld defaultWorld = null; String defmap = null; diff --git a/web/js/map.js b/web/js/map.js index 60d35a2e..e1342f01 100644 --- a/web/js/map.js +++ b/web/js/map.js @@ -1,6 +1,7 @@ "use strict"; //if (!console) console = { log: function() {} }; +var dynmapversion = "0.22"; // This needs to match plugin verison var componentconstructors = {}; var maptypes = {}; var map = null; // Leaflet assumes top-level 'map'... @@ -286,6 +287,12 @@ DynMap.prototype = { .addClass('alertbox') .hide() .appendTo(container); + + if(dynmapversion != me.options.dynmapversion) { + me.alertbox + .text('Web files are not matched with plugin version: All files need to be same version (' + me.options.dynmapverion + ')') + .show(); + } me.selectMap(me.defaultworld.defaultmap);