Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 20:40:08 +01:00
Account for time drifting backwards on servers with the moved too quickly check changes.
Dieser Commit ist enthalten in:
Ursprung
eac5b9623d
Commit
afb08bb0c5
@ -280,6 +280,9 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
|
||||
|
||||
// CraftBukkit start - make the movement speed check behave properly under tick degradation.
|
||||
int elapsedTicks = MinecraftServer.currentTick - this.lastTick;
|
||||
if (elapsedTicks < 0) { // We should account for time drifting backwards
|
||||
elapsedTicks = 1;
|
||||
}
|
||||
if (d8 > 100.0D * (elapsedTicks == 0 ? 1 : elapsedTicks)) {
|
||||
a.warning(this.player.name + " moved too quickly! Elapsed ticks: " + (elapsedTicks == 0 ? 1 : elapsedTicks) + ", Distance change: " + d8);
|
||||
this.disconnect("You moved too quickly :( (Hacking?)");
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren