summaryrefslogtreecommitdiffstats
path: root/Essentials/src/com/earth2me/essentials/craftbukkit/DummyOfflinePlayer.java
blob: 93efc8720354b9bd3907c8551d50ba5b94fce39a (plain)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
package com.earth2me.essentials.craftbukkit;

import java.util.Map;
import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
import org.bukkit.entity.Player;


public class DummyOfflinePlayer implements OfflinePlayer
{
	private final transient String name;

	public DummyOfflinePlayer(String name)
	{
		this.name = name;
	}

	@Override
	public boolean isOnline()
	{
		return false;
	}

	@Override
	public String getName()
	{
		return name;
	}

	@Override
	public boolean isBanned()
	{
		return false;
	}

	@Override
	public void setBanned(boolean bln)
	{
	}

	@Override
	public boolean isWhitelisted()
	{
		return false;
	}

	@Override
	public void setWhitelisted(boolean bln)
	{
	}

	@Override
	public Player getPlayer()
	{
		return Bukkit.getPlayerExact(name);
	}

	@Override
	public long getFirstPlayed()
	{
		throw new UnsupportedOperationException("Not supported yet.");
	}

	@Override
	public long getLastPlayed()
	{
		throw new UnsupportedOperationException("Not supported yet.");
	}

	@Override
	public boolean hasPlayedBefore()
	{
		throw new UnsupportedOperationException("Not supported yet.");
	}

	@Override
	public boolean isOp()
	{
		return false;
	}

	@Override
	public void setOp(boolean bln)
	{
	}

	@Override
	public Map<String, Object> serialize()
	{
		throw new UnsupportedOperationException("Not supported yet.");
	}
	
}