Hi, I've seen a lot of these recently. ↑ Btw, this is created by @dktapps And I've tried to look for API in pmmp. and I found nothing to do this.. :/ I really have no clue how to achieve that, does anybody can help me with this? Any API or Packet can be sent to Client? Or maybe client request Map Image from Server? Idk... i have no idea.. Thanks in advance
Wrong section. This is done by converting image data into an unsigned char (byte) array. The picture size must be exactly 127x127 because that's how many pixels a map has. To do this, get a filled map, then set a 'Color' property to its named tag like this: PHP: $namedTag = clone $filledMap->getNamedTag();$namedTag->Colors = new ByteArrayTag("Colors", /*unsigned char array here*/);$filledMap->setNamedTag($namedTag);
Oh... I just thought this is part of Plugin Help My mistake Oh okay, thanks! Now I get it :O "Color" namedTag is the one responsible for the data One more question, is pmmp ready with string -> ByteArray conversion API? Or I have to google a way to do the conversion?
Just read this thread, I created it when I was testing image maps: https://forums.pmmp.io/threads/solved-convert-image-data-into-byte-array.1534/#post-16944