public class LapisCorePermissions extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
LapisCorePermissions.PermissionManager |
| Constructor and Description |
|---|
LapisCorePermissions(LapisCorePlugin core) |
| Modifier and Type | Method and Description |
|---|---|
PlayerPermission |
calculatePermission(UUID uuid)
Calculate the PlayerPermission for a player
|
org.bukkit.permissions.Permission |
getAssignedPermission(UUID uuid)
Get the Bukkit permission assigned to a player
|
protected org.bukkit.permissions.Permission |
getOfflinePlayerPermission(UUID uuid)
Override this method to provide a method of retrieving the players permission while they are offline
|
Integer |
getPermissionValue(UUID uuid,
LapisPermission permission)
Get the raw Integer value of the permission for a player
|
boolean |
isPermitted(UUID uuid,
LapisPermission permission)
Check if a player is given a permission
|
void |
loadPermissions()
Call this method to load the permission values from config
once all of your LapisPermissions have been registered
|
void |
registerPermissions(LapisPermission... permission)
Register permissions with LapisPermission objects
|
protected void |
savePlayersPermission(UUID uuid,
org.bukkit.permissions.Permission perm)
Override this method to save the players permission for retrieval when they are offline
|
public LapisCorePermissions(LapisCorePlugin core)
public void registerPermissions(LapisPermission... permission)
permission - The permissions you wish to addpublic void loadPermissions()
public org.bukkit.permissions.Permission getAssignedPermission(UUID uuid)
uuid - The UUID of the playerpublic Integer getPermissionValue(UUID uuid, LapisPermission permission)
uuid - The UUID of the playerpermission - The Permission you want a value forpublic boolean isPermitted(UUID uuid, LapisPermission permission)
uuid - The UUID of the playerpermission - The Permission you wish to checkpublic PlayerPermission calculatePermission(UUID uuid)
uuid - The UUID of the playerprotected org.bukkit.permissions.Permission getOfflinePlayerPermission(UUID uuid)
uuid - The UUID of the player we want the permission ofprotected void savePlayersPermission(UUID uuid, org.bukkit.permissions.Permission perm)
uuid - The UUID of the player the permission is assigned toperm - The permission the player has been assignedCopyright © 2019. All rights reserved.