diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index 48c5ae9c69..33169e2978 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -880,12 +880,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void setTexturePack(String url) { - Validate.notNull(url, "Texture pack URL cannot be null"); + setResourcePack(url); + } - byte[] message = (url + "\0" + "16").getBytes(); - Validate.isTrue(message.length <= Messenger.MAX_MESSAGE_SIZE, "Texture pack URL is too long"); + @Override + public void setResourcePack(String url) { + Validate.notNull(url, "Resource pack URL cannot be null"); - getHandle().playerConnection.sendPacket(new PacketPlayOutCustomPayload("MC|TPack", message)); + getHandle().a(url); // should be setResourcePack } public void addChannel(String channel) {