summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/bukkit/entity/Player.java
diff options
context:
space:
mode:
authorNate Mortensen <nate.richard.mortensen@gmail.com>2013-12-17 19:44:21 -0700
committerNate Mortensen <nate.richard.mortensen@gmail.com>2013-12-17 20:15:16 -0700
commit3d8bb1aabf0883c12fea96a460027d3f519f4cb1 (patch)
tree4ae2bff735086730880589146392cb4162523bc9 /src/main/java/org/bukkit/entity/Player.java
parent1ac427113fe413437bf643eab941ccb4fd778232 (diff)
downloadbukkit-3d8bb1aabf0883c12fea96a460027d3f519f4cb1.tar
bukkit-3d8bb1aabf0883c12fea96a460027d3f519f4cb1.tar.gz
bukkit-3d8bb1aabf0883c12fea96a460027d3f519f4cb1.tar.lz
bukkit-3d8bb1aabf0883c12fea96a460027d3f519f4cb1.tar.xz
bukkit-3d8bb1aabf0883c12fea96a460027d3f519f4cb1.zip
Add new setResourcePack method. Fixes BUKKIT-5015
Minecraft now uses resource packs instead of texture packs. This commit adds a new method specific for resource packs, and deprecates setTexturePack.
Diffstat (limited to 'src/main/java/org/bukkit/entity/Player.java')
-rw-r--r--src/main/java/org/bukkit/entity/Player.java32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 1a71fcd7..7aa697d5 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -691,10 +691,42 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
* be encoded as per RFC 1738.
* @throws IllegalArgumentException Thrown if the URL is null.
* @throws IllegalArgumentException Thrown if the URL is too long.
+ * @deprecated Minecraft no longer uses textures packs. Instead you
+ * should use {@link #setResourcePack(String)}.
*/
+ @Deprecated
public void setTexturePack(String url);
/**
+ * Request that the player's client download and switch resource packs.
+ * <p>
+ * The player's client will download the new resource pack asynchronously
+ * in the background, and will automatically switch to it once the
+ * download is complete. If the client has downloaded and cached the same
+ * resource pack in the past, it will perform a quick timestamp check
+ * over the network to determine if the resource pack has changed and
+ * needs to be downloaded again. When this request is sent for the very
+ * first time from a given server, the client will first display a
+ * confirmation GUI to the player before proceeding with the download.
+ * <p>
+ * Notes:
+ * <ul>
+ * <li>Players can disable server resources on their client, in which
+ * case this method will have no affect on them.
+ * <li>There is no concept of resetting resource packs back to default
+ * within Minecraft, so players will have to relog to do so.
+ * </ul>
+ *
+ * @param url The URL from which the client will download the resource
+ * pack. The string must contain only US-ASCII characters and should
+ * be encoded as per RFC 1738.
+ * @throws IllegalArgumentException Thrown if the URL is null.
+ * @throws IllegalArgumentException Thrown if the URL is too long. The
+ * length restriction is an implementation specific arbitrary value.
+ */
+ public void setResourcePack(String url);
+
+ /**
* Gets the Scoreboard displayed to this player
*
* @return The current scoreboard seen by this player