From d8a39fc43897aefe488afa2ed83170f45505819f Mon Sep 17 00:00:00 2001 From: "Five (Xer)" Date: Wed, 11 Nov 2020 20:12:47 +0100 Subject: [PATCH] Snapshot 20w46a --- .../com/velocitypowered/api/network/ProtocolVersion.java | 2 +- api/src/main/java/com/velocitypowered/api/proxy/Player.java | 4 +++- .../proxy/connection/client/ConnectedPlayer.java | 5 ----- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/api/src/main/java/com/velocitypowered/api/network/ProtocolVersion.java b/api/src/main/java/com/velocitypowered/api/network/ProtocolVersion.java index 67cd49963..aaa04f9a7 100644 --- a/api/src/main/java/com/velocitypowered/api/network/ProtocolVersion.java +++ b/api/src/main/java/com/velocitypowered/api/network/ProtocolVersion.java @@ -54,7 +54,7 @@ public enum ProtocolVersion { MINECRAFT_1_16_2(751, "1.16.2"), MINECRAFT_1_16_3(753, "1.16.3"), MINECRAFT_1_16_4(754, "1.16.4", "1.16.5"), - MINECRAFT_1_17(-1, 5, "1.17"); // Note: Indev as of 20w45a (754, borked by Mojang) + MINECRAFT_1_17(-1, 6, "1.17"); // Note: Indev as of 20w45a (754, borked by Mojang) private static final int SNAPSHOT_BIT = 30; diff --git a/api/src/main/java/com/velocitypowered/api/proxy/Player.java b/api/src/main/java/com/velocitypowered/api/proxy/Player.java index 1a09ae3ca..4635c74fa 100644 --- a/api/src/main/java/com/velocitypowered/api/proxy/Player.java +++ b/api/src/main/java/com/velocitypowered/api/proxy/Player.java @@ -226,7 +226,9 @@ public interface Player extends CommandSource, Identified, InboundConnection, * @param url the URL for the resource pack * @param hash the SHA-1 hash value for the resource pack */ - void sendResourcePack(String url, byte[] hash); + default void sendResourcePack(String url, byte[] hash) { + sendResourcePack(url, hash, false); + } /** * Note that this method does not send a plugin message to the server the player diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ConnectedPlayer.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ConnectedPlayer.java index 9d6e98eac..602c002c1 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ConnectedPlayer.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ConnectedPlayer.java @@ -891,11 +891,6 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player { } } - @Override - public void sendResourcePack(String url, byte[] hash) { - sendResourcePack(url, hash, false); - } - /** * Sends a {@link KeepAlive} packet to the player with a random ID. * The response will be ignored by Velocity as it will not match the