Skip to content

Commit

Permalink
Apparently the texture can now be http or https, instead of just http
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim203 committed Nov 20, 2024
1 parent 71a766c commit 9bcc6ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/global_api/skins/skin_uploader.ex
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ defmodule GlobalApi.SkinUploader do
texture_data = body["data"]["texture"]

texture_id = texture_data["url"]
# http://textures.minecraft.net/texture/ = 38 chars long
texture_id = String.slice(texture_id, 38, String.length(texture_id) - 38)
# can vary now between http and https, so we just grab the last section
texture_id = String.split(texture_id, "/", trim: true) |> List.last()

skin_value = texture_data["value"]
skin_signature = texture_data["signature"]
Expand Down

0 comments on commit 9bcc6ae

Please sign in to comment.