Move assets out of the live folder because it makes absolutely no sense for them to be there

This commit is contained in:
Lukas Rieger (Blue) 2022-12-29 17:54:17 +01:00
parent 9560024eb5
commit eeabc2135c
No known key found for this signature in database
GPG Key ID: 2D09EC5ED2687FF2
4 changed files with 4 additions and 4 deletions

View File

@ -34,7 +34,7 @@ import java.util.Optional;
public class AssetStorageImpl implements AssetStorage {
private static final String ASSET_PATH = "live/assets/";
private static final String ASSET_PATH = "assets/";
private final Storage storage;
private final String mapId;

View File

@ -92,7 +92,7 @@ public class PlayerSkinUpdater implements ServerEventListener {
BufferedImage playerHead = playerMarkerIconFactory.apply(playerUuid, skin.get());
for (BmMap map : maps.values()) {
try (OutputStream out = map.getStorage().writeMeta(map.getId(), "live/assets/playerheads/" + playerUuid + ".png")) {
try (OutputStream out = map.getStorage().writeMeta(map.getId(), "assets/playerheads/" + playerUuid + ".png")) {
ImageIO.write(playerHead, "png", out);
} catch (IOException ex) {
Logger.global.logError("Failed to write player skin to storage: " + playerUuid, ex);

View File

@ -2,7 +2,7 @@
<div class="marker-item" :class="{'marker-hidden': !marker.visible}">
<div class="marker-button" :title="marker.id" @click="click(false)">
<div class="icon" v-if="marker.type === 'player'">
<img :src="'maps/' + mapId + '/live/assets/playerheads/' + marker.playerUuid + '.png'" alt="playerhead" @error="steve">
<img :src="'maps/' + mapId + '/assets/playerheads/' + marker.playerUuid + '.png'" alt="playerhead" @error="steve">
</div>
<div class="info">
<div class="label">{{markerLabel}}</div>

View File

@ -356,7 +356,7 @@ export class BlueMapApp {
const map = this.mapViewer.map;
if (!map) return;
this.playerMarkerManager = new PlayerMarkerManager(this.mapViewer.markers, map.data.dataUrl + "live/players.json", map.data.dataUrl + "live/assets/playerheads/", this.events);
this.playerMarkerManager = new PlayerMarkerManager(this.mapViewer.markers, map.data.dataUrl + "live/players.json", map.data.dataUrl + "assets/playerheads/", this.events);
this.playerMarkerManager.setAutoUpdateInterval(0);
return this.playerMarkerManager.update()
.then(() => {