Skip to content

Commit

Permalink
Fix null timestamps being passed to timekeeper improperly.
Browse files Browse the repository at this point in the history
  • Loading branch information
CoreyShupe committed Dec 7, 2022
1 parent b1fa9dc commit 0250d1e
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,10 @@ public ClientPlaySessionHandler(VelocityServer server, ConnectedPlayer player) {
}

@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;
Expand Down

0 comments on commit 0250d1e

Please sign in to comment.