From 0250d1ef8a081ce5fc3c7ae4e89c2d1753c7b914 Mon Sep 17 00:00:00 2001 From: Corey Shupe Date: Wed, 7 Dec 2022 12:56:27 -0500 Subject: [PATCH] Fix null timestamps being passed to timekeeper improperly. --- .../proxy/connection/client/ClientPlaySessionHandler.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 8c21ba3a4..2b01a3e27 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 @@ -127,7 +127,10 @@ public class ClientPlaySessionHandler implements MinecraftSessionHandler { } @SuppressWarnings("BooleanMethodIsAlwaysInverted") - private boolean updateTimeKeeper(Instant instant) { + private boolean updateTimeKeeper(@Nullable Instant instant) { + if (instant == null) { + return true; + } if (!this.timeKeeper.update(instant)) { player.disconnect(Component.translatable("multiplayer.disconnect.out_of_order_chat")); return false;