mirror of
https://github.com/azures04/crafatar.git
synced 2026-03-21 23:41:18 +01:00
mhf_alex should default to mhf_alex if skin not accessible
We only use the 'hard stored' mhf_alex skin when it's part of the 'default' query parameter. In the rare event that mhf_alex is requested but the skin is not accessible, we would fall back to 'mhf_steve' because it's the default for usernames. This commit adds the special case to use the stored version of the 'mhf_alex' skin when it's not accessible otherwise
This commit is contained in:
parent
b9f6a21942
commit
8367c1e519
@ -104,8 +104,12 @@ exp.resize_img = function(inname, size, callback) {
|
|||||||
// returns "mhf_alex" or "mhf_steve" calculated by the +uuid+
|
// returns "mhf_alex" or "mhf_steve" calculated by the +uuid+
|
||||||
exp.default_skin = function(uuid) {
|
exp.default_skin = function(uuid) {
|
||||||
if (uuid.length <= 16) {
|
if (uuid.length <= 16) {
|
||||||
// we can't get the skin type by username
|
if (uuid.toLowerCase() === "mhf_alex") {
|
||||||
return "mhf_steve";
|
return uuid;
|
||||||
|
} else {
|
||||||
|
// we can't get the skin type by username
|
||||||
|
return "mhf_steve";
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// great thanks to Minecrell for research into Minecraft and Java's UUID hashing!
|
// great thanks to Minecrell for research into Minecraft and Java's UUID hashing!
|
||||||
// https://git.io/xJpV
|
// https://git.io/xJpV
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user