Is it possible to make when the player join to the server download for it resource pack without show the resource pack form and ask him if he wants to download it and remove the resource pack from his device when he leave. I think i should use: ResourcePackClientResponsePacket but how i should use it exactly?
I don't think you can apply a resource pack to a client without the client receiving that message, if that's what you mean. I know I wouldn't want a server forcing a resource pack on my device without asking first. I may be mistaken, but I believe server resource packs are disabled when you leave that server.
Yeah this is what i mean. You may be right, but i want it because there is a thing i didn't like it, That when i edit a file in my server's resource packs, And the player join for not first time, He gets the old resource pack that before i edit it, So he should remove it from 'Settings->Storage->Cache Data->Remove' to get the new resource pack that i edited, So i thought why if i make when the player leave, The server remove the resource pack from his device using a code and when the player joins, The server download the resource pack to him without showing him the message about if you want to download the resource pack.
There's definitely no way to clear any data from the user's device, but maybe if the changed texture pack has a different identifier or name, the device would download it instead because it's a "different" texture pack?
Changing the uuid of the pack will probably make MCPE download it again, but if you change it too often, the player's device will be full of your old packs.
Yeah you are right but like what said @HimbeersaftLB , the player device will be full of old resource packs
Instead of changing the uuid you should change the version of your resourcepack. That way the old resourcepack will be replaced, too, afaik.