-
Notifications
You must be signed in to change notification settings - Fork 87
SkullMeta setOwner #127
Comments
|
This issue seems stale, it should be closed |
I can confirm that using setOwner changes the skin of the head to an alex, then to the correct skin. The alex stays around for 1-2 seconds before updating. |
I'll work on that. |
Okay, actually it isn't a bug, it's just minecraft fault... It takes around 450ms to download skin texture. So slow |
Is the skin texture cached? |
Yea it is, but sometimes there is no player in cache and the server has to download texture. When the skin is alex the server is downloading actual skin. NachoSpigot/NachoSpigot-Server/src/main/java/net/minecraft/server/MinecraftServer.java Line 133 in ebf0841
https://github.com/Electroid/mojang-api - I've heard this api is great, I'm also using this in my auth plugins. |
Spammed that API and Mojang's API a couple of times and it seems that Electroid's API is faster. |
So if you want, feel free to PR that. But keep in mind to keep the old logic for Minecraft's session server in case Electroid's API breaks. We need a fallback in the case that such a thing happens. |
So just do a try-catch, and if that fails send a request to Mojang's API and continue from there. Make sure to log an error for that in the console so we can check what's wrong. |
You have maybe mojang api from different ips to bypass mojang's limit? |
Definetly faster, and also Electroid's api has no ratelimit. |
It uses normal mojang urls, so it has 600 connections per 10 minutes, but I see it has its own url. |
There is a way to bypass rate limit. |
I think I've done that. It's nearly(or fully?) impossible to make heads load instantly, we would have to make heads sync what would make this even worse, imagine for example 200 heads loading at once and a player has to wait while heads are loading. |
@sadcenter Since there's not a lot of data, you could also just go through each line and find the right one and parse it yourself. |
This was the bug @sadcenter I think |
Okay, NVM after some tests I've concluded that parsing doesn't make a real difference here |
Also, if possible, make sure to cache it. And check if the player is online, if so grab their skin since when they're online it should be held in memory so you don't need to send a unnecessary http request. |
It's already in the code |
IMO there are cooler things and optimizations that should be created in Nacho first. |
I always thought it was like servers in the sense that servers can only be offline or online, unless you mean separate proxies (or unless I'm just oblivious to that knowledge). Cool idea, but as @andreasdc said there's other stuff the project is focusing on. If you wanna contribute something like that I'd love to see that on this project, though! |
I think @sadcenter wants to do auth plugin to check premium users on spigot, but I think it's better to look into getCubes, movement, double interactions, packet sending and many other cool optimizations that can be done in Nacho, we are fork of Taco, good fork of Paper, right? |
I want to add accessibility to set online mode per player in |
@sadcenter Any updates? Might wanna PR this soon if possible so this issue can be closed :) |
Will calling setOwner to the same name spam mojang api or will it cache in ItemStack SkullMeta?
The text was updated successfully, but these errors were encountered: