13
0
geforkt von Mirrors/Velocity

Merge pull request #894 from CoreyShupe/hotfix/check-null-instant

Fix null timestamps being passed to timekeeper improperly.
Dieser Commit ist enthalten in:
Corey Shupe 2022-12-07 13:08:57 -05:00 committet von GitHub
Commit 2727a03ef7
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

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