-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API Usage: Disguise with Skin URL (and Value/Signature) #26
Comments
Currently, iDisguise does not provide an API to use skins other than those associated with a paid Minecraft account. Since the server can in principle send any skin URL to the clients, I could add an API for that if you wish. However, the custom skins need to be hosted externally, because the server only sends URLs to the client no actual textures. Concerning skin caching: At the moment iDisguise caches skins only at runtime, which means they are loaded once per server run (and reloaded at server reload/restart). |
What I mean by caching is saving the base64 encoded signature and value of a skin. When you query a skin the url in the base64 encoded signature response stays the same for the skin, even if the player changes it. By caching the base64 response the plugin would be able to create a "Skin Database" that can be populate by a single account chaning skins and saving them into the database. To clarify: the following base64 values were encoded for my skin. {"timestamp":1539327650091,"profileId":"e81f7928bfc144bfb57b18ab7a6361e9","profileName":"Silthus","signatureRequired":true,"textures":{"SKIN":{"url":"http://textures.minecraft.net/texture/401300e75d7883829cdc1ed60ed62fa292f21ed002da2f22920023c61b1f9ab3"}}} If you open the texture URL you will see a Kakaschi skin (green with an eye patch). Afterwards I changed my skin to a new one using this generator: https://mineskin.org/394723 I am now a blue hedgedog and the json encoded skin has changed to: {"timestamp":1539802492906,"profileId":"e81f7928bfc144bfb57b18ab7a6361e9","profileName":"Silthus","signatureRequired":true,"textures":{"SKIN":{"url":"http://textures.minecraft.net/texture/bad54c9abaadd77c13bbc12e07894c258265f3d27aefbf58af9b9b2f6eff4a76"}}} As you can see: every skin uploaded gets a unique URL that is saved in the game profile. By caching the signature und texture values (base64) you could setup a database with skins that are not directly connected to players. |
Ok, I see what you'd like to have :) I'll do my best to create an API for this. |
Awesome thanks! If you want you could also provide an interface to implement the skin storage. This way you would not need to setup a database or something and could leave it to users of the API how to store the skins. |
Hey, ich hab grad gesehen, dass du auch aus Deutschland kommst :) Ich hab mir jetzt folgendes gedacht:
Beispiel:
|
Zusätzlich erstelle ich eine API mit der andere Plugins selbst Skin-Infos ablegen können, sodass Skins auch von Nicht-Mojang-Servern geladen werden können. |
(Obiges Beispiel ist wirklich als Beispiel zu verstehen. Ob ich tatsächlich UUIDs als Keys verwenden werde, sollte ich mir noch gut überlegen...) |
Klingt gut 👍🏻 So könnten sich Admins eine Datenbank mit Skins aufbauen. Später könnte man dann ein Chest UI oder ähnliches zum durchsuchen bereitstellen. Ich fände es außerdem gut wenn es eine Art Storage Provider Interface gibt mit dem man die darunter liegende Skin Storage tauschen kann. So könnte ich z.b. in meinem Plugin den Skin Cache gegen eine DB tauschen und die Skins in einem Web Interface verwaltbar machen. Damit du aber nicht den ganzen Aufwand hast eben ein Storage Provider Interface das default in flat files oder vielleicht sogar nur dem Cache speichert. Was meinst du? Wenn gewünscht kann ich auch gerne einen PR stellen :) |
Ich hab das Konzept noch einmal überdacht, und denke es ist besser wie folgt:
Und die Idee mit dem Storage Provider finde ich auch gut. |
First off: thanks for this awesome plugin! I am primarily using it to the directly use the well defined and documented API.
However I am missing a way to define fixed Skins for my Npcs based on a skin value and signature.
Is there a way to use the API to fetch a skin by url or disguise a player/entity by providing the base64 encoded texture and signature strings?
Maybe it would also be possible to provide a skin name and then get and save the texture and signature strings? With that I could make it that our quest writers define the skin name in the config and on first load it will fetch the skin and save it in the config. This way if the skin changes it would not update, since the signature and texture are cached in the config. I think citizens does it this way.
The text was updated successfully, but these errors were encountered: