diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/WebFilesManager.java b/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/WebFilesManager.java index 729c7759..106378d5 100644 --- a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/WebFilesManager.java +++ b/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/WebFilesManager.java @@ -203,8 +203,17 @@ public void setFrom(WebappConfig config) { } public void addFrom(WebappConfig config) { - this.scripts.addAll(config.getScripts()); - this.styles.addAll(config.getStyles()); + Set scripts = config.getScripts(); + for (String script : scripts) { + this.scripts.add(script); + Logger.global.logDebug("Registering script from Webapp Config: " + script); + } + + Set styles = config.getStyles(); + for (String style : styles) { + this.styles.add(style); + Logger.global.logDebug("Registering style from Webapp Config: " + style); + } } } diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/api/WebAppImpl.java b/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/api/WebAppImpl.java index 88fb11ea..a58abd08 100644 --- a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/api/WebAppImpl.java +++ b/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/api/WebAppImpl.java @@ -26,6 +26,7 @@ import de.bluecolored.bluemap.api.WebApp; import de.bluecolored.bluemap.common.plugin.Plugin; +import de.bluecolored.bluemap.core.logger.Logger; import de.bluecolored.bluemap.core.util.FileHelper; import javax.imageio.ImageIO; @@ -68,11 +69,13 @@ public boolean getPlayerVisibility(UUID player) { @Override public void registerScript(String url) { + Logger.global.logDebug("Registering script from API: " + url); plugin.getBlueMap().getWebFilesManager().getScripts().add(url); } @Override public void registerStyle(String url) { + Logger.global.logDebug("Registering style from API: " + url); plugin.getBlueMap().getWebFilesManager().getStyles().add(url); } diff --git a/BlueMapCommon/webapp/src/js/BlueMapApp.js b/BlueMapCommon/webapp/src/js/BlueMapApp.js index 18896468..5d2cf60d 100644 --- a/BlueMapCommon/webapp/src/js/BlueMapApp.js +++ b/BlueMapCommon/webapp/src/js/BlueMapApp.js @@ -146,6 +146,7 @@ export class BlueMapApp { let styleElement = document.createElement("link"); styleElement.rel = "stylesheet"; styleElement.href = styleUrl; + alert(this.events, "Loading style: " + styleUrl, "fine"); document.head.appendChild(styleElement); } @@ -189,6 +190,7 @@ export class BlueMapApp { if (this.settings.scripts) for (let scriptUrl of this.settings.scripts) { let scriptElement = document.createElement("script"); scriptElement.src = scriptUrl; + alert(this.events, "Loading script: " + scriptUrl, "fine"); document.body.appendChild(scriptElement); } }