diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ClientPlaySessionHandler.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ClientPlaySessionHandler.java index 7c8729610..e26814244 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ClientPlaySessionHandler.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ClientPlaySessionHandler.java @@ -285,8 +285,7 @@ public class ClientPlaySessionHandler implements MinecraftSessionHandler { @Override public boolean handle(ResourcePackResponse packet) { - return player.onResourcePackResponse(packet.getStatus(), - ByteBufUtil.decodeHexDump(packet.getHash())); + return player.onResourcePackResponse(packet.getStatus()); } @Override 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 1f30633c5..0360bc255 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 @@ -808,7 +808,7 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player { .compareTo(ProtocolVersion.MINECRAFT_1_17) >= 0) { break; } - onResourcePackResponse(PlayerResourcePackStatusEvent.Status.DECLINED, new byte[0]); + onResourcePackResponse(PlayerResourcePackStatusEvent.Status.DECLINED); queued = null; } if (queued == null) { @@ -844,9 +844,7 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player { /** * Processes a client response to a sent resource-pack. */ - public boolean onResourcePackResponse(PlayerResourcePackStatusEvent.Status status, - @Nullable byte[] hash) { - + public boolean onResourcePackResponse(PlayerResourcePackStatusEvent.Status status) { final boolean peek = status == PlayerResourcePackStatusEvent.Status.ACCEPTED; final ResourcePackInfo queued = peek ? outstandingResourcePacks.peek() : outstandingResourcePacks.poll(); @@ -863,7 +861,6 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player { } }); - switch (status) { case ACCEPTED: previousResourceResponse = true; @@ -884,9 +881,7 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player { } if (!peek) { - connection.eventLoop().execute(() -> { - tickResourcePackQueue(); - }); + connection.eventLoop().execute(this::tickResourcePackQueue); } return queued != null && queued.getOrigin() == ResourcePackInfo.Origin.DOWNSTREAM_SERVER;