CoopRequest.java 609 Bytes
Newer Older
Melledy's avatar
Melledy committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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();
	}
}