Added a field, getter and setter for the last tick a player inputted anything.

This commit is contained in:
2022-05-24 00:28:53 +01:00
parent fa9cba99bb
commit 49ca0fe465

View File

@ -9,6 +9,7 @@ public class ProtectedPlayer {
private int gracePeriodTimeRemaining = 0; private int gracePeriodTimeRemaining = 0;
private final Timer gracePeriodTimer = new Timer(); private final Timer gracePeriodTimer = new Timer();
private State state; private State state;
private int lastInputTick = -1;
/** /**
* Constructor for a ProtectedPlayer. * Constructor for a ProtectedPlayer.
@ -63,6 +64,14 @@ public class ProtectedPlayer {
this.state = state; this.state = state;
} }
public int getLastInputTick() {
return lastInputTick;
}
public void setLastInputTick(int lastInputTick) {
this.lastInputTick = lastInputTick;
}
public enum State { public enum State {
JOINING, JOINING,
AFK, AFK,