CoopRequest.java 588 Bytes
Newer Older
Melledy's avatar
Melledy committed
1
2
3
package emu.grasscutter.game;

public class CoopRequest {
4
	private final Player requester;
Melledy's avatar
Melledy committed
5
6
7
	private final long requestTime;
	private final long expireTime;
	
8
	public CoopRequest(Player requester) {
Melledy's avatar
Melledy committed
9
10
11
12
13
		this.requester = requester;
		this.requestTime = System.currentTimeMillis();
		this.expireTime = this.requestTime + 10000;
	}

14
	public Player getRequester() {
Melledy's avatar
Melledy committed
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
		return requester;
	}

	public long getRequestTime() {
		return requestTime;
	}

	public long getExpireTime() {
		return expireTime;
	}
	
	public boolean isExpired() {
		return System.currentTimeMillis() > getExpireTime();
	}
}