mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-28 13:15:30 +01:00
Add version check for javascript files versus plugin version
This commit is contained in:
parent
9322c5426d
commit
6181aa8ba9
@ -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;
|
||||
|
@ -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'...
|
||||
@ -287,6 +288,12 @@ DynMap.prototype = {
|
||||
.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);
|
||||
|
||||
var componentstoload = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user