diff --git a/web/js/map.js b/web/js/map.js index 1b50114c..bb5b18ac 100644 --- a/web/js/map.js +++ b/web/js/map.js @@ -405,7 +405,6 @@ DynMap.prototype = { me.servertime = update.servertime; var newserverday = (me.servertime > 23100 || me.servertime < 12900); if(me.serverday != newserverday) { - console.log('serverday changed', newserverday) me.serverday = newserverday; me.updateBackground(); diff --git a/web/js/regions.js b/web/js/regions.js index 9e1843dc..f0f51486 100644 --- a/web/js/regions.js +++ b/web/js/regions.js @@ -69,6 +69,7 @@ componentconstructors['regions'] = function(dynmap, configuration) { } function createPopupContent(name, region) { + var members = region.members || {}; return $('
').addClass('regioninfo') .append($('').addClass('regionname').text(name)) .append($('').addClass('owners') @@ -76,8 +77,8 @@ componentconstructors['regions'] = function(dynmap, configuration) { .append(region.owners.groups && $('').addClass('groupowners').text(region.owners.groups.concat())) ) .append($('').addClass('members') - .append(region.members.players && $('').addClass('playermembers').text(region.members.players.concat())) - .append(region.members.groups && $('').addClass('groupmembers').text(region.members.groups.concat())) + .append(members.players && $('').addClass('playermembers').text(members.players.concat())) + .append(members.groups && $('').addClass('groupmembers').text(members.groups.concat())) ) .append(region.parent && $('').addClass('regionparent').text(region.parent)) .append(region.flags && function() { diff --git a/web/js/regions_Residence.js b/web/js/regions_Residence.js index 406ce240..2217d9ef 100644 --- a/web/js/regions_Residence.js +++ b/web/js/regions_Residence.js @@ -4,16 +4,16 @@ regionConstructors['Residence'] = function(dynmap, configuration) { return boxCreator(area.X1, area.X2, area.Y1, area.Y2, area.Z1, area.Z2); } - $.getJSON('standalone/res_' + worldName + '.json', function(data) { + $.getJSON('standalone/res_' + configuration.worldName + '.json', function(data) { var boxLayers = []; $.each(data, function(name, residence) { - if(worldName == residence.Permissions.World) { + if(configuration.worldName == residence.Permissions.World) { $.each(residence.Areas, function(name, area) { var boxLayer = configuration.createBoxLayer(area.X1, area.X2, area.Y1, area.Y2, area.Z1, area.Z2); boxLayer.bindPopup(configuration.createPopupContent(name, $.extend(residence, { owners: { players: [residence.Permissions.Owner] }, - flags: region.Permissions.AreaFlags + flags: residence.Permissions.AreaFlags }))); boxLayers.push(boxLayer);