-
-
Notifications
You must be signed in to change notification settings - Fork 131
/
PlayersManager.java
119 lines (102 loc) · 2.71 KB
/
PlayersManager.java
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
package com.bgsoftware.superiorskyblock.api.handlers;
import com.bgsoftware.superiorskyblock.api.island.PlayerRole;
import com.bgsoftware.superiorskyblock.api.player.container.PlayersContainer;
import com.bgsoftware.superiorskyblock.api.wrappers.SuperiorPlayer;
import org.bukkit.entity.Player;
import javax.annotation.Nullable;
import java.util.List;
import java.util.UUID;
public interface PlayersManager {
/**
* Get a player by it's name.
*
* @param name The name to check.
* @return The player with that name.
*/
@Nullable
SuperiorPlayer getSuperiorPlayer(@Nullable String name);
/**
* Get a player by a player.
*
* @param player The player to check.
*/
SuperiorPlayer getSuperiorPlayer(Player player);
/**
* Get a player by it's uuid.
*
* @param uuid The uuid to check.
* @return The player with that uuid.
*/
SuperiorPlayer getSuperiorPlayer(UUID uuid);
/**
* Get all the players that joined the server.
*/
List<SuperiorPlayer> getAllPlayers();
/**
* Get a player role by it's weight.
*
* @param weight The weight to check.
* @return The player role with that weight.
*/
@Nullable
@Deprecated
PlayerRole getPlayerRole(int weight);
/**
* Get a player role by it's id.
*
* @param id The id to check.
* @return The player role with that weight.
*/
@Nullable
@Deprecated
PlayerRole getPlayerRoleFromId(int id);
/**
* Get a player role by it's name.
*
* @param name The name to check.
* @return The player role with that name.
* If there's no role with that name, IllegalArgumentException will be thrown.
* @deprecated see {@link RolesManager}
*/
@Deprecated
PlayerRole getPlayerRole(String name);
/**
* Get the default role that players are assigned with when they join an island.
*
* @deprecated see {@link RolesManager}
*/
@Deprecated
PlayerRole getDefaultRole();
/**
* Get the highest role in the ladder - aka, leader's role.
*
* @deprecated see {@link RolesManager}
*/
@Deprecated
PlayerRole getLastRole();
/**
* Get the guest's role.
*
* @deprecated see {@link RolesManager}
*/
@Deprecated
PlayerRole getGuestRole();
/**
* Get the co-op's role.
*
* @deprecated see {@link RolesManager}
*/
@Deprecated
PlayerRole getCoopRole();
/**
* Get a list of all the roles.
*
* @deprecated see {@link RolesManager}
*/
@Deprecated
List<PlayerRole> getRoles();
/**
* Get the players container.
*/
PlayersContainer getPlayersContainer();
}