Closed ToniTang closed 10 years ago
This is what I'm seeing:
This is what I am now seeing. Is this an issue with Minecraft's skin servers? The issue is now reversed between the URLs
(The first image with the actual head showing is without a file extension type defined).
Your browser has the second image cached it seems, I get your avatar properly when I do https://minotar.net/helm/ToniTang/300.png
Ah I see, it was a cache issue. However these issues I'm trying to show here happen on my staff list:
As you may see, a lot of them have Steve heads because of their case-sensitive names. Under the other owner's name: "chayne_" it displays a default Steve skin head:
https://minotar.net/helm/chayne_/105.png
However when it's changed to a capital C as so:
https://minotar.net/helm/Chayne_/105.png
It shows just fine. I cannot (even though I wish) change the case sensitivity of the usernames on my site as it retrieves it from zPermission's database which does not add case sensitive names into the database for various reasons. I was informed, and I also believe that with the case-insensitivity fetching was a much better option then modifying an entire structure to a database to a plugin that is used by many servers.
zPermission should be storing them case sensitive :)
We had a feature that resolved the users skin regardless, based on Mojang's API but that functionality is temporarily disabled due to performance issues. It should be back soon.
I wish they were to be honest. I asked and they said it would be too much work to make it so.
And yes, I remember that, it actually was in service just a few weeks ago if I'm not mistaken. Can't wait for it to be fixed.
Literally two days ago :)
I don't like to be a joiner but i made a PHP script that gets the UUID and the real full cased username of a player, making stuff not case sensitive if you want it i can post it.
I'd like to try it for the time being please, are you on Spigot forums?
Nope, i can just post it here. it's not too long, just 30 lines.
Alrighty. I just didn't want to interfere with Minotar's issue tracking.
<?php
ini_set("display_errors", false);
$user = $_GET['user'];
if(!isset($_GET['user'])){
$user = "char";
}
if(empty($_GET['user'])){
$user = "char";
}
$arr = array("name"=>$user, "agent"=>"minecraft");
$data = json_encode($arr);
$ch = curl_init('https://api.mojang.com/profiles/page/1');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Content-Length: ' . strlen($data))
);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
if(!($res = curl_exec($ch))) {
echo('[cURL Failure] ' . curl_error($ch));
}
curl_close($ch);
echo $res;
?>
Thank you, I appreciate it.
No problem.
I see that you still haven't managed to fix the issue you had with your website, you can try using http://www.mc-heads.net, it's not case sensitive...
Ah yes, I tried using the script however I think I may be using it improperly. I tried using it via filename.php?user=name however I didn't exactly return anything else besides a blank screen. Maybe I'm missing some extensions?
here's the same script after some work. the only thing it should return is the correctly cased username; <?php ini_set("display_errors", false); $user = $_GET['user']; $arr = array("name"=>$user, "agent"=>"minecraft"); $data = json_encode($arr);
$ch = curl_init('https://api.mojang.com/profiles/page/1'); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json', 'Content-Length: ' . strlen($data)) ); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
if(!($res = curl_exec($ch))) { echo('[cURL Failure] ' . curl_error($ch)); }
curl_close($ch); echo $res; $username = json_decode($res, true); echo $username['profiles']['0']['name']; ?>
Just wanted to let everyone know, I just pushed out all of the fixes required to get Minotar on track with the new skin system and I've made some big improvements to how images are generated and cached. If anyone is still having issues please make a new GitHub issue and I'll gladly help you out.
Thanks!
When you do not include the file type extension to a size change at the end of a URL to minotar, it reverts back to the default Steve skin.
An example would be this: http://minotar.net/helm/ToniTang/300 would be a Steve skin
However when you add a file type extension it seems to work http://minotar.net/helm/ToniTang/300.png