Added a field, getter and setter for the last tick a player inputted anything.
This commit is contained in:
@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user