robingrether / iDisguise

Plugin for CraftBukkit and Spigot
https://www.spigotmc.org/resources/idisguise.5509/
Creative Commons Attribution Share Alike 4.0 International
20 stars 28 forks source link

Skin caching #3

Closed ALCC01 closed 8 years ago

ALCC01 commented 8 years ago

With Mojang limiting the skin API at 1 request minute/UUID/ip, I think it would be pretty useful allowing the plugin to cache the skins it downloads.

One particular use case of this feature would be a minigame I'm developing that heavily relies on skins and disguising players as other players (about 20 requests per match), which means that after the first game the server is banned from requiring the same skins, virtually breaking the game.

I hope you'll consider addressing this issue.

robingrether commented 8 years ago

Have you experienced any issues in this particular case? Actually, the plugin should already use a GameProfile cache to prevent any problems.

ALCC01 commented 8 years ago

Yes, as I mentioned earlier (maybe the API is cut out of the caching system?) the plugin does not seem to be caching anything.

Maybe I'm doing it wrong, here's how the minigame interacts with the iDisguise API:

The problem is, at the beginning of the next game no player gets disguised because the server is banned from the Mojang API. Here's the stacktrace, even if I doubt it will be useful.

robingrether commented 8 years ago

The caching system works whether you use the API or not. I tried switching between 2 player disguises about 15 to 20 times on my local server, everything worked fine. So no problem here.

By the way, the stacktrace you linked has nothing to do with iDisguise. It shows an error caused by the Minecraft server itself which failed to load the skin for a player skull block. So, as I said before, the cache works and there is no problem.