From 33411d9ee5a54c7a4e21c1ed1cd99e60717ec66a Mon Sep 17 00:00:00 2001 From: mooinglemur Date: Sat, 26 Dec 2020 10:06:15 -0700 Subject: [PATCH 1/4] Allow for URI-unsafe player names Some plugins allow for a player name prefix. If this contains a username-unsafe character like %, it can break player face rendering on the map. --- DynmapCore/src/main/resources/extracted/web/js/minecraft.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DynmapCore/src/main/resources/extracted/web/js/minecraft.js b/DynmapCore/src/main/resources/extracted/web/js/minecraft.js index f71ddb11..62eca83f 100644 --- a/DynmapCore/src/main/resources/extracted/web/js/minecraft.js +++ b/DynmapCore/src/main/resources/extracted/web/js/minecraft.js @@ -8,9 +8,9 @@ function createMinecraftHead(player,size,completed,failed) { }; var faceimg; if(size == 'body') - faceimg = 'faces/body/' + player + '.png'; + faceimg = 'faces/body/' + encodeURIComponent(player) + '.png'; else - faceimg = 'faces/' + size + 'x' + size + '/' + player + '.png'; + faceimg = 'faces/' + size + 'x' + size + '/' + encodeURIComponent(player) + '.png'; faceImage.src = concatURL(dynmap.options.url.markers, faceimg); } @@ -57,4 +57,4 @@ function chat_encoder(message) { } } return message.text; -} \ No newline at end of file +} From 3f821a902d21a22dd6cdd9a02a6c2c1060f396f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ben=20L=C3=B6nnqvist?= Date: Fri, 8 Jan 2021 23:45:30 +0200 Subject: [PATCH 2/4] added option webp-l to use lossless webp #3191 --- DynmapCore/src/main/java/org/dynmap/MapType.java | 3 ++- DynmapCore/src/main/java/org/dynmap/utils/ImageIOManager.java | 2 +- fabric-1.16.1/src/main/resources/configuration.txt | 2 +- fabric-1.16.2/src/main/resources/configuration.txt | 2 +- fabric-1.16.4/src/main/resources/configuration.txt | 2 +- forge-1.11.2/src/main/resources/configuration.txt | 2 +- forge-1.12.2/src/main/resources/configuration.txt | 2 +- forge-1.13.2/src/main/resources/configuration.txt | 2 +- forge-1.14.4/src/main/resources/configuration.txt | 2 +- forge-1.15.2/src/main/resources/configuration.txt | 2 +- forge-1.16.1/src/main/resources/configuration.txt | 2 +- forge-1.16.2/src/main/resources/configuration.txt | 2 +- forge-1.16.3/src/main/resources/configuration.txt | 2 +- spigot/src/main/resources/configuration.txt | 2 +- 14 files changed, 15 insertions(+), 14 deletions(-) diff --git a/DynmapCore/src/main/java/org/dynmap/MapType.java b/DynmapCore/src/main/java/org/dynmap/MapType.java index aada3863..bd0724c9 100644 --- a/DynmapCore/src/main/java/org/dynmap/MapType.java +++ b/DynmapCore/src/main/java/org/dynmap/MapType.java @@ -73,7 +73,8 @@ public abstract class MapType { FORMAT_WEBP("webp", 85, ImageEncoding.WEBP), FORMAT_WEBP90("webp-q90", 90, ImageEncoding.WEBP), FORMAT_WEBP95("webp-q95", 95, ImageEncoding.WEBP), - FORMAT_WEBP100("webp-q100", 100, ImageEncoding.WEBP); + FORMAT_WEBP100("webp-q100", 100, ImageEncoding.WEBP), + FORMAT_WEBPL("webp-l", 85, ImageEncoding.WEBP); String id; float qual; ImageEncoding enc; diff --git a/DynmapCore/src/main/java/org/dynmap/utils/ImageIOManager.java b/DynmapCore/src/main/java/org/dynmap/utils/ImageIOManager.java index 8e7dd86f..3d57cd69 100644 --- a/DynmapCore/src/main/java/org/dynmap/utils/ImageIOManager.java +++ b/DynmapCore/src/main/java/org/dynmap/utils/ImageIOManager.java @@ -59,7 +59,7 @@ public class ImageIOManager { fos.close(); // Run encoder to new new temp file File tmpfile2 = File.createTempFile("pngToWebp", "webp"); - String args[] = { core.getCWEBPPath(), "-q", Integer.toString((int)fmt.getQuality()), tmpfile.getAbsolutePath(), "-o", tmpfile2.getAbsolutePath() }; + String args[] = { core.getCWEBPPath(), fmt.getID().endsWith("-l")?"-lossless":"", "-q", Integer.toString((int)fmt.getQuality()), tmpfile.getAbsolutePath(), "-o", tmpfile2.getAbsolutePath() }; Process pr = Runtime.getRuntime().exec(args); try { pr.waitFor(); diff --git a/fabric-1.16.1/src/main/resources/configuration.txt b/fabric-1.16.1/src/main/resources/configuration.txt index 579197f5..b01fc80d 100644 --- a/fabric-1.16.1/src/main/resources/configuration.txt +++ b/fabric-1.16.1/src/main/resources/configuration.txt @@ -254,7 +254,7 @@ block-alias: # "minecraft:quartz_ore": "stone" # "diamond_ore": "coal_ore" -# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100), +# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100, wepb-l), # Note: any webp format requires the presence of the 'webp command line tools' (cwebp, dwebp) (https://developers.google.com/speed/webp/download) # # Has no effect on maps with explicit format settings diff --git a/fabric-1.16.2/src/main/resources/configuration.txt b/fabric-1.16.2/src/main/resources/configuration.txt index 579197f5..b01fc80d 100644 --- a/fabric-1.16.2/src/main/resources/configuration.txt +++ b/fabric-1.16.2/src/main/resources/configuration.txt @@ -254,7 +254,7 @@ block-alias: # "minecraft:quartz_ore": "stone" # "diamond_ore": "coal_ore" -# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100), +# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100, wepb-l), # Note: any webp format requires the presence of the 'webp command line tools' (cwebp, dwebp) (https://developers.google.com/speed/webp/download) # # Has no effect on maps with explicit format settings diff --git a/fabric-1.16.4/src/main/resources/configuration.txt b/fabric-1.16.4/src/main/resources/configuration.txt index 579197f5..b01fc80d 100644 --- a/fabric-1.16.4/src/main/resources/configuration.txt +++ b/fabric-1.16.4/src/main/resources/configuration.txt @@ -254,7 +254,7 @@ block-alias: # "minecraft:quartz_ore": "stone" # "diamond_ore": "coal_ore" -# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100), +# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100, wepb-l), # Note: any webp format requires the presence of the 'webp command line tools' (cwebp, dwebp) (https://developers.google.com/speed/webp/download) # # Has no effect on maps with explicit format settings diff --git a/forge-1.11.2/src/main/resources/configuration.txt b/forge-1.11.2/src/main/resources/configuration.txt index 579197f5..b01fc80d 100644 --- a/forge-1.11.2/src/main/resources/configuration.txt +++ b/forge-1.11.2/src/main/resources/configuration.txt @@ -254,7 +254,7 @@ block-alias: # "minecraft:quartz_ore": "stone" # "diamond_ore": "coal_ore" -# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100), +# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100, wepb-l), # Note: any webp format requires the presence of the 'webp command line tools' (cwebp, dwebp) (https://developers.google.com/speed/webp/download) # # Has no effect on maps with explicit format settings diff --git a/forge-1.12.2/src/main/resources/configuration.txt b/forge-1.12.2/src/main/resources/configuration.txt index 579197f5..b01fc80d 100644 --- a/forge-1.12.2/src/main/resources/configuration.txt +++ b/forge-1.12.2/src/main/resources/configuration.txt @@ -254,7 +254,7 @@ block-alias: # "minecraft:quartz_ore": "stone" # "diamond_ore": "coal_ore" -# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100), +# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100, wepb-l), # Note: any webp format requires the presence of the 'webp command line tools' (cwebp, dwebp) (https://developers.google.com/speed/webp/download) # # Has no effect on maps with explicit format settings diff --git a/forge-1.13.2/src/main/resources/configuration.txt b/forge-1.13.2/src/main/resources/configuration.txt index 579197f5..b01fc80d 100644 --- a/forge-1.13.2/src/main/resources/configuration.txt +++ b/forge-1.13.2/src/main/resources/configuration.txt @@ -254,7 +254,7 @@ block-alias: # "minecraft:quartz_ore": "stone" # "diamond_ore": "coal_ore" -# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100), +# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100, wepb-l), # Note: any webp format requires the presence of the 'webp command line tools' (cwebp, dwebp) (https://developers.google.com/speed/webp/download) # # Has no effect on maps with explicit format settings diff --git a/forge-1.14.4/src/main/resources/configuration.txt b/forge-1.14.4/src/main/resources/configuration.txt index 579197f5..b01fc80d 100644 --- a/forge-1.14.4/src/main/resources/configuration.txt +++ b/forge-1.14.4/src/main/resources/configuration.txt @@ -254,7 +254,7 @@ block-alias: # "minecraft:quartz_ore": "stone" # "diamond_ore": "coal_ore" -# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100), +# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100, wepb-l), # Note: any webp format requires the presence of the 'webp command line tools' (cwebp, dwebp) (https://developers.google.com/speed/webp/download) # # Has no effect on maps with explicit format settings diff --git a/forge-1.15.2/src/main/resources/configuration.txt b/forge-1.15.2/src/main/resources/configuration.txt index 579197f5..b01fc80d 100644 --- a/forge-1.15.2/src/main/resources/configuration.txt +++ b/forge-1.15.2/src/main/resources/configuration.txt @@ -254,7 +254,7 @@ block-alias: # "minecraft:quartz_ore": "stone" # "diamond_ore": "coal_ore" -# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100), +# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100, wepb-l), # Note: any webp format requires the presence of the 'webp command line tools' (cwebp, dwebp) (https://developers.google.com/speed/webp/download) # # Has no effect on maps with explicit format settings diff --git a/forge-1.16.1/src/main/resources/configuration.txt b/forge-1.16.1/src/main/resources/configuration.txt index 579197f5..b01fc80d 100644 --- a/forge-1.16.1/src/main/resources/configuration.txt +++ b/forge-1.16.1/src/main/resources/configuration.txt @@ -254,7 +254,7 @@ block-alias: # "minecraft:quartz_ore": "stone" # "diamond_ore": "coal_ore" -# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100), +# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100, wepb-l), # Note: any webp format requires the presence of the 'webp command line tools' (cwebp, dwebp) (https://developers.google.com/speed/webp/download) # # Has no effect on maps with explicit format settings diff --git a/forge-1.16.2/src/main/resources/configuration.txt b/forge-1.16.2/src/main/resources/configuration.txt index 579197f5..b01fc80d 100644 --- a/forge-1.16.2/src/main/resources/configuration.txt +++ b/forge-1.16.2/src/main/resources/configuration.txt @@ -254,7 +254,7 @@ block-alias: # "minecraft:quartz_ore": "stone" # "diamond_ore": "coal_ore" -# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100), +# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100, wepb-l), # Note: any webp format requires the presence of the 'webp command line tools' (cwebp, dwebp) (https://developers.google.com/speed/webp/download) # # Has no effect on maps with explicit format settings diff --git a/forge-1.16.3/src/main/resources/configuration.txt b/forge-1.16.3/src/main/resources/configuration.txt index 579197f5..b01fc80d 100644 --- a/forge-1.16.3/src/main/resources/configuration.txt +++ b/forge-1.16.3/src/main/resources/configuration.txt @@ -254,7 +254,7 @@ block-alias: # "minecraft:quartz_ore": "stone" # "diamond_ore": "coal_ore" -# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100), +# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100, wepb-l), # Note: any webp format requires the presence of the 'webp command line tools' (cwebp, dwebp) (https://developers.google.com/speed/webp/download) # # Has no effect on maps with explicit format settings diff --git a/spigot/src/main/resources/configuration.txt b/spigot/src/main/resources/configuration.txt index e7cd835e..4ec83e78 100644 --- a/spigot/src/main/resources/configuration.txt +++ b/spigot/src/main/resources/configuration.txt @@ -255,7 +255,7 @@ block-alias: # "minecraft:quartz_ore": "stone" # "diamond_ore": "coal_ore" -# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100), +# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100, wepb-l), # Note: any webp format requires the presence of the 'webp command line tools' (cwebp, dwebp) (https://developers.google.com/speed/webp/download) # # Has no effect on maps with explicit format settings From e7148ae560171452c74b9d43bee3670d97acb6b0 Mon Sep 17 00:00:00 2001 From: mikeprimm Date: Sat, 9 Jan 2021 17:59:42 -0600 Subject: [PATCH 3/4] Update README.md --- README.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index df42ffb6..bf38fcc8 100644 --- a/README.md +++ b/README.md @@ -4,26 +4,37 @@ Dynmap 3.x+ uses Gradle for building support for all platforms, with all resulting artifacts produced in the /targets directory To build, run: + ./gradlew clean build install + Or (on Windows): + gradlew.bat clean build install # What platforms are supported? The following target platforms are supported: -- CraftBukkit/Spigot - via the Dynmap--spigot.jar plugin (supports MC v1.11.2 through v1.16.1) +- CraftBukkit/Spigot - via the Dynmap--spigot.jar plugin (supports MC v1.11.2 through v1.16.4) - Forge v1.11.2 - via Dynmap--forge-1.11.2.jar mod - Forge v1.12.2 - via Dynmap--forge-1.12.2.jar mod - Forge v1.13.2 - via Dynmap--forge-1.13.2.jar mod - Forge v1.14.4 - via Dynmap--forge-1.14.4.jar mod - Forge v1.15.2 - via Dynmap--forge-1.15.2.jar mod - Forge v1.16.1 - via Dynmap--forge-1.16.1.jar mod +- Forge v1.16.2 - via Dynmap--forge-1.16.2.jar mod +- Forge v1.16.3 - via Dynmap--forge-1.16.3.jar mod +- Forge v1.16.4 - via Dynmap--forge-1.16.4.jar mod +- Fabric v1.15.2 - via Dynmap--fabric-1.15.2.jar mod +- Fabric v1.16.1 - via Dynmap--fabric-1.16.1.jar mod +- Fabric v1.16.2 - via Dynmap--fabric-1.16.2.jar mod +- Fabric v1.16.4 - via Dynmap--fabric-1.16.4.jar mod # Data Storage Dynmap supports the following storage backends: - Flat files: The default for a new installation - SQLite - MySQL -- PostgreSQL: EXPERIMENTAL +- PostgreSQL +- MariaDB # Contributing to Dynmap's Code The Dynmap team welcomes Pull Requests with fixes, new features, and new platform support. That said, the following rules apply: From 1f26c08501437d683a903e14fb22e081adc732a5 Mon Sep 17 00:00:00 2001 From: mikeprimm Date: Sat, 9 Jan 2021 18:06:48 -0600 Subject: [PATCH 4/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bf38fcc8..c0e0e721 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Or (on Windows): # What platforms are supported? The following target platforms are supported: -- CraftBukkit/Spigot - via the Dynmap--spigot.jar plugin (supports MC v1.11.2 through v1.16.4) +- Spigot/PaperMC - via the Dynmap--spigot.jar plugin (supports MC v1.11.2 through v1.16.4) - Forge v1.11.2 - via Dynmap--forge-1.11.2.jar mod - Forge v1.12.2 - via Dynmap--forge-1.12.2.jar mod - Forge v1.13.2 - via Dynmap--forge-1.13.2.jar mod