blob: 3a77d426e087708561ff5cd0713f163a23ccb1a6 (
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
|
package net.ess3.api;
import java.io.File;
import java.util.Set;
import net.ess3.user.PlayerNotFoundException;
import net.ess3.user.TooManyMatchesException;
import org.bukkit.entity.Player;
public interface IUserMap extends IReload
{
boolean userExists(final String name);
IUser getUser(final Player player);
IUser getUser(final String playerName);
void removeUser(final String name) throws InvalidNameException;
Set<String> getAllUniqueUsers();
int getUniqueUsers();
File getUserFile(final String name) throws InvalidNameException;
/**
* This method never returns null and includes hidden players.
*
* @param name
* @param includeOffline
* @return
* @throws TooManyMatchesException if more than one player is found matching the name
* @throws PlayerNotFoundException if the player matching the name is not found
*/
IUser matchUser(final String name, final boolean includeOffline) throws TooManyMatchesException, PlayerNotFoundException;
/**
* This method never returns null and is for online players only.
*
* @param name
* @param requester Can be null, if the requester is the console
* @return
* @throws TooManyMatchesException if more than one player is found matching the name
* @throws PlayerNotFoundException if the player matching the name is not found
*/
IUser matchUserExcludingHidden(final String name, final Player requester) throws TooManyMatchesException, PlayerNotFoundException;
Set<IUser> matchUsers(final String name, final boolean includeOffline);
Set<IUser> matchUsersExcludingHidden(final String name, final Player requester);
void addPrejoinedPlayer(Player player);
void removePrejoinedPlayer(Player player);
}
|