I can't resend a texturepack request

Viewed 67

I code currently a minecraft java plugin which loads a texturepack but I have a problem. When you decline the download of the texturepack, it will never ask again for downloading or accepting and I never got a error.

I used this code:

player.setResourcepack("<url>");

and it showed one time so it does work but never ask again if I decline it. Please help.

3 Answers

Try to provide a new version of the texture pack or rename the texture pack. As a result the players should receive a new request.

You can send packages and listen to the responses. There are many ways to do so. Essentially, you have to send a PacketPlayOutResourcePackSend packet with the necessary information.

Afterwards, listen to the PacketPlayInResourcePackStatus. There are just a few possible states: SUCCESSFULLY_LOADED, DECLINED, FAILED_DOWNLOAD, ACCEPTED. In theory, you have to resend the package request once the state is DECLINED. (Like my credit card -.-)

I can't give you any more details since I haven't used this in a while, but no one else seemed to answer your question.

Related