Use player account for skin URL. Fixes #2
This commit is contained in:
parent
4f00a2a325
commit
165afd762c
@ -103,7 +103,7 @@ export class PlayerIcon extends DivIcon {
|
||||
|
||||
Util.getMinecraftHead(player, size).then(head => {
|
||||
this._playerImage!.src = head.src;
|
||||
});
|
||||
}).catch(() => {});
|
||||
} else {
|
||||
this._playerImage = noSkinImage.cloneNode(false) as HTMLImageElement;
|
||||
}
|
||||
|
@ -50,12 +50,12 @@ export default {
|
||||
resolve(faceImage);
|
||||
};
|
||||
|
||||
faceImage.onerror = function() {
|
||||
console.warn('Failed to retrieve face of "', player, '" with size "', size, '"!');
|
||||
reject();
|
||||
faceImage.onerror = function(e) {
|
||||
console.warn(`Failed to retrieve face of ${player.account} with size ${size}!`);
|
||||
reject(e);
|
||||
};
|
||||
|
||||
const src = (size === 'body') ? `faces/body/${player.name}.png` :`faces/${size}x${size}/${player.name}.png`;
|
||||
const src = (size === 'body') ? `faces/body/${player.account}.png` :`faces/${size}x${size}/${player.account}.png`;
|
||||
faceImage.src = this.concatURL(window.config.url.markers, src);
|
||||
});
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user