mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-19 19:25:48 +00:00
Fixed custom player heads errors
This commit is contained in:
parent
6a4e23853c
commit
23c2ab0f65
@ -57,6 +57,7 @@
|
||||
* Fixed ChestTerminals deleting items from Cargo networks (TheBusyBiscuit/ChestTerminal#25)
|
||||
* Fixed #1926
|
||||
* Fixed #1933
|
||||
* Fixed random errors because of Mojang's new player heads backend (Why... Mojang... why?)
|
||||
|
||||
## Release Candidate 11 (25 Apr 2020)
|
||||
|
||||
|
@ -198,14 +198,9 @@ public final class SlimefunUtils {
|
||||
|
||||
String base64 = texture;
|
||||
|
||||
if (!texture.startsWith("ey")) {
|
||||
if (PatternUtils.ALPHANUMERIC.matcher(texture).matches()) {
|
||||
base64 = Base64.getEncoder().encodeToString(("{\"textures\":{\"SKIN\":{\"url\":\"http://textures.minecraft.net/texture/" + texture + "\"}}}").getBytes(StandardCharsets.UTF_8));
|
||||
}
|
||||
else {
|
||||
throw new IllegalArgumentException("The provided texture (" + texture + ") does not seem to be a valid texture String!");
|
||||
}
|
||||
}
|
||||
|
||||
return SkullItem.fromBase64(base64);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user