2022-04-17 12:43:07 +00:00
|
|
|
package emu.grasscutter.game;
|
|
|
|
|
|
|
|
public class CoopRequest {
|
2022-04-27 04:21:57 +00:00
|
|
|
private final Player requester;
|
2022-04-17 12:43:07 +00:00
|
|
|
private final long requestTime;
|
|
|
|
private final long expireTime;
|
|
|
|
|
2022-04-27 04:21:57 +00:00
|
|
|
public CoopRequest(Player requester) {
|
2022-04-17 12:43:07 +00:00
|
|
|
this.requester = requester;
|
|
|
|
this.requestTime = System.currentTimeMillis();
|
|
|
|
this.expireTime = this.requestTime + 10000;
|
|
|
|
}
|
|
|
|
|
2022-04-27 04:21:57 +00:00
|
|
|
public Player getRequester() {
|
2022-04-17 12:43:07 +00:00
|
|
|
return requester;
|
|
|
|
}
|
|
|
|
|
|
|
|
public long getRequestTime() {
|
|
|
|
return requestTime;
|
|
|
|
}
|
|
|
|
|
|
|
|
public long getExpireTime() {
|
|
|
|
return expireTime;
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean isExpired() {
|
|
|
|
return System.currentTimeMillis() > getExpireTime();
|
|
|
|
}
|
|
|
|
}
|