mirror of
https://github.com/webbukkit/dynmap.git
synced 2025-01-29 02:51:40 +01:00
Merge remote branch 'upstream/master'
This commit is contained in:
commit
641406a68e
6
pom.xml
6
pom.xml
@ -29,6 +29,12 @@
|
|||||||
<descriptors>
|
<descriptors>
|
||||||
<descriptor>src/main/assembly/package.xml</descriptor>
|
<descriptor>src/main/assembly/package.xml</descriptor>
|
||||||
</descriptors>
|
</descriptors>
|
||||||
|
<!-- Hack for bug in maven-assembly: http://jira.codehaus.org/browse/MASSEMBLY-449 -->
|
||||||
|
<archiverConfig>
|
||||||
|
<fileMode>420</fileMode> <!-- 420(dec) = 644(oct) -->
|
||||||
|
<directoryMode>493</directoryMode> <!-- 493(dec) = 755(oct) -->
|
||||||
|
<defaultDirectoryMode>493</defaultDirectoryMode>
|
||||||
|
</archiverConfig>
|
||||||
</configuration>
|
</configuration>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
|
@ -14,7 +14,7 @@ regionConstructors['WorldGuard'] = function(dynmap, configuration) {
|
|||||||
return boxCreator(ArrayMax(xs), ArrayMin(xs), region['max-y'], region['min-y'], ArrayMax(zs), ArrayMin(zs));
|
return boxCreator(ArrayMax(xs), ArrayMin(xs), region['max-y'], region['min-y'], ArrayMax(zs), ArrayMin(zs));
|
||||||
}
|
}
|
||||||
if(!region.min || !region.max)
|
if(!region.min || !region.max)
|
||||||
return [];
|
return null;
|
||||||
if(region.max.y <= region.min.y)
|
if(region.max.y <= region.min.y)
|
||||||
region.min.y = region.max.y - 1;
|
region.min.y = region.max.y - 1;
|
||||||
return boxCreator(region.max.x, region.min.x, region.max.y, region.min.y, region.max.z, region.min.z);
|
return boxCreator(region.max.x, region.min.x, region.max.y, region.min.y, region.max.z, region.min.z);
|
||||||
@ -25,11 +25,16 @@ regionConstructors['WorldGuard'] = function(dynmap, configuration) {
|
|||||||
$.getJSON('standalone/'+regionFile, function(data) {
|
$.getJSON('standalone/'+regionFile, function(data) {
|
||||||
var boxLayers = [];
|
var boxLayers = [];
|
||||||
$.each(data, function(name, region) {
|
$.each(data, function(name, region) {
|
||||||
var boxLayer = createBoxFromRegion(region, configuration.createBoxLayer);
|
// Only handle cuboids for the moment (therefore skipping 'global')
|
||||||
|
if (region.type === 'cuboid') {
|
||||||
boxLayer.bindPopup(configuration.createPopupContent(name, region));
|
var boxLayer = createBoxFromRegion(region, configuration.createBoxLayer);
|
||||||
|
// Skip errorous regions.
|
||||||
boxLayers.push(boxLayer);
|
if (boxLayer) {
|
||||||
|
boxLayer.bindPopup(configuration.createPopupContent(name, region));
|
||||||
|
|
||||||
|
boxLayers.push(boxLayer);
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
configuration.result(new L.LayerGroup(boxLayers));
|
configuration.result(new L.LayerGroup(boxLayers));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user