File tree Expand file tree Collapse file tree 3 files changed +16
-2
lines changed
src/main/java/de/bluecolored/bluemap/common Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -203,8 +203,17 @@ public void setFrom(WebappConfig config) {
203203 }
204204
205205 public void addFrom (WebappConfig config ) {
206- this .scripts .addAll (config .getScripts ());
207- this .styles .addAll (config .getStyles ());
206+ Set <String > scripts = config .getScripts ();
207+ for (String script : scripts ) {
208+ this .scripts .add (script );
209+ Logger .global .logDebug ("Registering script from Webapp Config: " + script );
210+ }
211+
212+ Set <String > styles = config .getStyles ();
213+ for (String style : styles ) {
214+ this .styles .add (style );
215+ Logger .global .logDebug ("Registering style from Webapp Config: " + style );
216+ }
208217 }
209218
210219 }
Original file line number Diff line number Diff line change 2626
2727import de .bluecolored .bluemap .api .WebApp ;
2828import de .bluecolored .bluemap .common .plugin .Plugin ;
29+ import de .bluecolored .bluemap .core .logger .Logger ;
2930import de .bluecolored .bluemap .core .util .FileHelper ;
3031
3132import javax .imageio .ImageIO ;
@@ -68,11 +69,13 @@ public boolean getPlayerVisibility(UUID player) {
6869
6970 @ Override
7071 public void registerScript (String url ) {
72+ Logger .global .logDebug ("Registering script from API: " + url );
7173 plugin .getBlueMap ().getWebFilesManager ().getScripts ().add (url );
7274 }
7375
7476 @ Override
7577 public void registerStyle (String url ) {
78+ Logger .global .logDebug ("Registering style from API: " + url );
7679 plugin .getBlueMap ().getWebFilesManager ().getStyles ().add (url );
7780 }
7881
Original file line number Diff line number Diff line change @@ -146,6 +146,7 @@ export class BlueMapApp {
146146 let styleElement = document . createElement ( "link" ) ;
147147 styleElement . rel = "stylesheet" ;
148148 styleElement . href = styleUrl ;
149+ alert ( this . events , "Loading style: " + styleUrl , "fine" ) ;
149150 document . head . appendChild ( styleElement ) ;
150151 }
151152
@@ -189,6 +190,7 @@ export class BlueMapApp {
189190 if ( this . settings . scripts ) for ( let scriptUrl of this . settings . scripts ) {
190191 let scriptElement = document . createElement ( "script" ) ;
191192 scriptElement . src = scriptUrl ;
193+ alert ( this . events , "Loading script: " + scriptUrl , "fine" ) ;
192194 document . body . appendChild ( scriptElement ) ;
193195 }
194196 }
You can’t perform that action at this time.
0 commit comments