With 1.3.x, MineCraft servers allow the option of "forcing" a texture pack on all clients. This of course, leads to interesting possibilities for plugins. In this thread are 2 methods for doing a runtime texture pack change on a player's client. No client mod required! Method 1 - Packet Sending: Code: public void setTexture(Player toSetOn, String pathToTexture) { ((CraftPlayer) toSetOn).getHandle().netServerHandler .sendPacket(new Packet250CustomPayload("MC|TPack", (pathToTexture + "\0" + 16).getBytes())); } Method 2 - EntityPlayer.a: Code: public void setTexture(Player toSetOn, String pathToTexture) { ((CraftPlayer) toSetOn).getHandle().a(pathToTexture, 16); } This can also be achieved by sending a call to the 'MC|TPack' plugin channel containing the URL of the texture pack. And it gets better: you don't even have to include a full TPack. If you want to say, just change rain, just include enviroment/rain.png! Minecraft will use the default textures by default. Oh, and automagically. Hope that helped!
Icyene Some questions. How to reset a TP ? More questions to come after I test it EDIT1 : In the second method remove the last parenthesis EDIT2 : Does this work for TP's URLs ? Thanks
rominos2 You cannot reset texture packs. That is a backdraw of this method. Thanks, I must've missed that. It only works for URLs.
gomeow I believe that he was asking about resetting the tpack to what it was before the change. And you don't even need to send a default tpack, just send an empty string as a URL.
Icyene This is brilliant! I was also taking a look at your meteor tutorial today--loved that one too.