https://forums.pocketmine.net/threads/npc-skin-converter.9223/ I used this, but IDK where to put this...
$human->setSkin($code, $slim); BTW this isn't called code. It is a binary blob or a hex string. If it is something like 0123456789abcdef, you have to hex2bin($code) instead.
Then put the blob in a file in resources folder and getResource it. Resources are meant for placing large files that you want to represent in string literals.
You can give it whatever file extensions. And getResource has nothing to do with file extensions. Actually, file extensions mean nothing to the PocketMine API.
PHP: $resource = $Plugin->getResource($filename);$data = stream_get_contents($resource);fclose($data); It is a binary blob. You should save it in the resources folder directly. No need to bin2hex. This file is in binary form. A good file extension for this file is .bin
It did not work. It spawned a Mr.Gray... My legoboy.skin file: My code: PHP: $nbt->Skin = new Compound("Skin", [ "Data" => new String("Data", $senderSkin), "Slim" => new Byte("Slim", $IsSlim) ]);
I used the one from grabbag with the .skin file. I replaced the content with the one I got from the website. $senderSkin is the code you gave me. I just replaced the var with $this->getConfig()->get("skin-file"); The config looks like this: Code: skin-file: "legoboy.skin" After everything is processed, I did fclose($resource); ???