Bukkit/CraftBukkit — pull request #901 by thvortex (2012-10-09 23:00:57+00:00)
Title: Proposed new CraftPlayer.switchTexturePack() API - BUKKIT-2579

This adds a new CraftPlayer.switchTexturePack() API which causes the Minecraft client to download and switch to a new texture pack as specified by a URL. A new API call is necessary because using sendPluginMessage() directly to send the texture pack URL to the client's builtin "MC|TPack" channel is not supported. See https://bukkit.atlassian.net/browse/BUKKIT-2579 for details.

A working plugin which makes use of this new API is my modification to WorldGuard which adds a "texture-pack" region flag. As the client moves around on the server map, WorldGuard can have the client switch to different texture packs that are appropriate for that area of the map and/or dimension. See https://github.com/thvortex/worldguard/tree/texture-pack for details.