mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-11-26 20:45:16 +01:00
Push BlueMapVue and add version to index.html on web-app creation
This commit is contained in:
parent
d64353bf31
commit
9afcb33790
@ -1 +1 @@
|
|||||||
Subproject commit 0dc79bb9ad37188c9a1d220c3902f9da7d25594c
|
Subproject commit 65841378855748c78ebe927e8002cd18c96df7ac
|
@ -173,7 +173,11 @@ private synchronized void loadWorldsAndMaps() throws InterruptedException {
|
|||||||
try {
|
try {
|
||||||
loadMapConfig(entry.getKey(), entry.getValue());
|
loadMapConfig(entry.getKey(), entry.getValue());
|
||||||
} catch (ConfigurationException ex) {
|
} catch (ConfigurationException ex) {
|
||||||
Logger.global.logError(ex);
|
Logger.global.logWarning(ex.getFormattedExplanation());
|
||||||
|
Throwable cause = ex.getRootCause();
|
||||||
|
if (cause != null) {
|
||||||
|
Logger.global.logError("Detailed error:", ex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
import com.google.gson.GsonBuilder;
|
import com.google.gson.GsonBuilder;
|
||||||
import de.bluecolored.bluemap.common.config.WebappConfig;
|
import de.bluecolored.bluemap.common.config.WebappConfig;
|
||||||
|
import de.bluecolored.bluemap.core.BlueMap;
|
||||||
import de.bluecolored.bluemap.core.logger.Logger;
|
import de.bluecolored.bluemap.core.logger.Logger;
|
||||||
import de.bluecolored.bluemap.core.resources.adapter.ResourcesGson;
|
import de.bluecolored.bluemap.core.resources.adapter.ResourcesGson;
|
||||||
import org.apache.commons.io.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
||||||
@ -115,6 +116,13 @@ public void updateFiles() throws IOException {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// set version in index.html
|
||||||
|
Path indexFile = webRoot.resolve("index.html");
|
||||||
|
String indexContent = Files.readString(indexFile);
|
||||||
|
indexContent = indexContent.replace("%version%", BlueMap.VERSION);
|
||||||
|
Files.writeString(indexFile, indexContent);
|
||||||
|
|
||||||
} finally {
|
} finally {
|
||||||
if (!tempFile.delete()) {
|
if (!tempFile.delete()) {
|
||||||
Logger.global.logWarning("Failed to delete file: " + tempFile);
|
Logger.global.logWarning("Failed to delete file: " + tempFile);
|
||||||
@ -125,6 +133,8 @@ public void updateFiles() throws IOException {
|
|||||||
@SuppressWarnings("all")
|
@SuppressWarnings("all")
|
||||||
private static class Settings {
|
private static class Settings {
|
||||||
|
|
||||||
|
private String version = BlueMap.VERSION;
|
||||||
|
|
||||||
private boolean useCookies = true;
|
private boolean useCookies = true;
|
||||||
|
|
||||||
private boolean enableFreeFlight = true;
|
private boolean enableFreeFlight = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user