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

Melledy's avatar
Melledy committed
3
4
import emu.grasscutter.game.player.Player;

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

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

	public long getRequestTime() {
		return requestTime;
	}

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