@@ -68,7 +68,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
private final MinecraftServer minecraftServer;
public EntityPlayer player;
private int e;
- private long f; private void setLastPing(long lastPing) { this.f = lastPing;}; private long getLastPing() { return this.f;}; // Paper - OBFHELPER
+ private long f = getCurrentMillis(); private void setLastPing(long lastPing) { this.f = lastPing;}; private long getLastPing() { return this.f;}; // Paper - OBFHELPER - set ping to delay initial
@@ -100,6 +100,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
private int receivedMovePackets;
private int processedMovePackets;
private AutoRecipe H = new AutoRecipe();
+ private static final long KEEPALIVE_LIMIT = Long.getLong("paper.playerconnection.keepalive", 30) * 1000; // Paper - provide property to set keepalive limit
public PlayerConnection(MinecraftServer minecraftserver, NetworkManager networkmanager, EntityPlayer entityplayer) {
this.minecraftServer = minecraftserver;
@@ -179,18 +180,25 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {