mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-12-02 23:20:39 +00:00
30 lines
609 B
Java
30 lines
609 B
Java
|
package emu.grasscutter.game;
|
||
|
|
||
|
public class CoopRequest {
|
||
|
private final GenshinPlayer requester;
|
||
|
private final long requestTime;
|
||
|
private final long expireTime;
|
||
|
|
||
|
public CoopRequest(GenshinPlayer requester) {
|
||
|
this.requester = requester;
|
||
|
this.requestTime = System.currentTimeMillis();
|
||
|
this.expireTime = this.requestTime + 10000;
|
||
|
}
|
||
|
|
||
|
public GenshinPlayer getRequester() {
|
||
|
return requester;
|
||
|
}
|
||
|
|
||
|
public long getRequestTime() {
|
||
|
return requestTime;
|
||
|
}
|
||
|
|
||
|
public long getExpireTime() {
|
||
|
return expireTime;
|
||
|
}
|
||
|
|
||
|
public boolean isExpired() {
|
||
|
return System.currentTimeMillis() > getExpireTime();
|
||
|
}
|
||
|
}
|