-
Notifications
You must be signed in to change notification settings - Fork 12
/
PermissionSystem.java
65 lines (54 loc) · 1.7 KB
/
PermissionSystem.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
package me.philipsnostrum.bungeepexbridge.permsystem;
import net.md_5.bungee.api.connection.ProxiedPlayer;
import java.util.List;
public interface PermissionSystem {
/**
* Whether or not this permission system requires MySQL to be enabled
*/
boolean requiresMySQL();
/**
* Retrieves all existent groups from the permissions system
*
* @return list of group names
*/
List<String> getGroups() throws Exception;
/**
* Retrieves a group's permissions
*
* @param group Permissions group name
* @return list of group permissions
*/
List<String> getGroupPermissions(String group);
/**
* Retrieves all groups specified group inherits from
*
* @param group Permissions group name
* @return list of groups this group inherits
*/
List<String> getInheritance(String group) throws Exception;
/**
* @param group Permissions group name
* @return group's rank. "Less is more" - lowest rank = highest group. OR 0 if not supported/available
*/
long getRank(String group);
/**
* Retrieves player's individual permissions
*
* @param player UUID of player
* @return list of player's permissions
*/
List<String> getPlayerPermissions(ProxiedPlayer player) throws Exception;
/**
* Retrieves all groups the player belongs to (global, not world based)
*
* @param player UUID of player
* @return list of player's groups
*/
List<String> getPlayerGroups(ProxiedPlayer player) throws Exception;
/**
* Retrieves the name of the default group
*
* @return name of the default group
*/
String getDefaultGroup() throws Exception;
}