samolego / FabricTailor

A server-side or singleplayer skin changing mod for fabric.
https://modrinth.com/mod/FabricTailor
GNU Lesser General Public License v3.0
109 stars 17 forks source link

[HELP] Setting custom skin folder for a server #98

Closed MmeCromatique closed 1 month ago

MmeCromatique commented 7 months ago

Hello, I'm administrating a small server in which players need to change skins often. Therefore I would've liked to make a folder on the server so players could easily pull from it for custom skins

The way it was discussed in Issue 60 I thought I could do it but cannot get it to work.

Here are the details:

In the config file i made this edit: "custom_skin_server": "file:///home/amp/.ampdata/instances/ContreduMinecraft01/Minecraft/skins/", the files are valid pngs simply named '.png'

I tried altering the config with changes like file:// or starting at /home, adding more quotes, removing slashes, but the same error persist error /skin set custom slim mel /skin set custom slim mel.png and other variants leads to the same

Of course the complete command /skin set upload slim /home/amp/.ampdata/instances/ContreduMinecraft01/Minecraft/skins/mel.png works fine but is not really practical nor easy for players

Is what I want possible ? If so what am I doing wrong ?

samolego commented 7 months ago

Hum, afaik the option needs http skin server, not sure if file protocol will work. It's been some time when I developed this ...

MmeCromatique commented 7 months ago

You gave me the idea of a workaround

I created a local apache2 server on the same network with the skins on it. I can access them fine with my navigator like we would get a mojang texture.

Therefore the config file looks like this "custom_skin_server": "http://192.168.1.142/skins/", But I just get the same error with like 30 seconds of delay this time Also tried http://192.168.1.142/skins/{player}.png to no different result

samolego commented 7 months ago

Ah, I think I know what's going on. The "api server" should return same responses as Mojang's, that is base64encoded skin info.

Afaik ely.by has a docker container you can set up for automatic management of this.

Another idea would be to build the skin server into fabrictailor itself, but that's a bigger project :).

MmeCromatique commented 7 months ago

And it seems that ely.by's chrly is not really what I need, it's more of a proxy to Mojang's and not really what I was looking for...

So what was said in issue 60 is just impossible if I understand correctly ?

samolego commented 1 month ago

I don't know if you still need help, but for anybody else this might be helpful:

Currently, fabrictailor forwards the URL to mineskin API, meaning the skin server should be reachable from outside (e.g. not with 192.168...) This could be improved by uploading the local asset from the server, but it would need some modifications to existing code.