Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-12-24 15:20:35 +01:00
Sanity: reset ping ID after getting the right KeepAlive
Dieser Commit ist enthalten in:
Ursprung
9e999e1e5a
Commit
6c61aa49f3
@ -208,4 +208,8 @@ public class VelocityServerConnection implements MinecraftConnectionAssociation,
|
|||||||
this.lastPingId = lastPingId;
|
this.lastPingId = lastPingId;
|
||||||
this.lastPingSent = System.currentTimeMillis();
|
this.lastPingSent = System.currentTimeMillis();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void resetLastPingId() {
|
||||||
|
this.lastPingId = -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -69,6 +69,7 @@ public class ClientPlaySessionHandler implements MinecraftSessionHandler {
|
|||||||
}
|
}
|
||||||
player.setPing(System.currentTimeMillis() - serverConnection.getLastPingSent());
|
player.setPing(System.currentTimeMillis() - serverConnection.getLastPingSent());
|
||||||
serverConnection.getMinecraftConnection().write(packet);
|
serverConnection.getMinecraftConnection().write(packet);
|
||||||
|
serverConnection.resetLastPingId();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren