mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-12-18 06:38:28 +01:00
Fixed formatting in PermissionsManager class
This commit is contained in:
parent
5ff9b7550e
commit
06d6bd4a7e
@ -61,14 +61,17 @@ public class PermissionsManager {
|
|||||||
* Essentials group manager instance.
|
* Essentials group manager instance.
|
||||||
*/
|
*/
|
||||||
private GroupManager groupManagerPerms;
|
private GroupManager groupManagerPerms;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Permissions manager instance for the legacy permissions system.
|
* Permissions manager instance for the legacy permissions system.
|
||||||
*/
|
*/
|
||||||
private PermissionHandler defaultPerms;
|
private PermissionHandler defaultPerms;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* zPermissions service instance.
|
* zPermissions service instance.
|
||||||
*/
|
*/
|
||||||
private ZPermissionsService zPermissionsService;
|
private ZPermissionsService zPermissionsService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Vault instance.
|
* Vault instance.
|
||||||
*/
|
*/
|
||||||
@ -90,8 +93,8 @@ public class PermissionsManager {
|
|||||||
/**
|
/**
|
||||||
* Check if the permissions manager is currently hooked into any of the supported permissions systems.
|
* Check if the permissions manager is currently hooked into any of the supported permissions systems.
|
||||||
*
|
*
|
||||||
d.
|
* @return False if there isn't any permissions system used.
|
||||||
* @return False if there isn't any permissions system used. */
|
*/
|
||||||
public boolean isEnabled() {
|
public boolean isEnabled() {
|
||||||
return !permsType.equals(PermissionsSystemType.NONE);
|
return !permsType.equals(PermissionsSystemType.NONE);
|
||||||
}
|
}
|
||||||
@ -99,8 +102,8 @@ public class PermissionsManager {
|
|||||||
/**
|
/**
|
||||||
* Return the permissions system where the permissions manager is currently hooked into.
|
* Return the permissions system where the permissions manager is currently hooked into.
|
||||||
*
|
*
|
||||||
e.
|
* @return Permissions system type.
|
||||||
* @return Permissions system type. */
|
*/
|
||||||
public PermissionsSystemType getUsedPermissionsSystemType() {
|
public PermissionsSystemType getUsedPermissionsSystemType() {
|
||||||
return this.permsType;
|
return this.permsType;
|
||||||
}
|
}
|
||||||
@ -108,8 +111,8 @@ public class PermissionsManager {
|
|||||||
/**
|
/**
|
||||||
* Setup and hook into the permissions systems.
|
* Setup and hook into the permissions systems.
|
||||||
*
|
*
|
||||||
m.
|
* @return The detected permissions system.
|
||||||
* @return The detected permissions system. */
|
*/
|
||||||
public PermissionsSystemType setup() {
|
public PermissionsSystemType setup() {
|
||||||
// Define the plugin manager
|
// Define the plugin manager
|
||||||
final PluginManager pm = this.server.getPluginManager();
|
final PluginManager pm = this.server.getPluginManager();
|
||||||
@ -245,8 +248,8 @@ public class PermissionsManager {
|
|||||||
/**
|
/**
|
||||||
* Reload the permissions manager, and re-hook all permission plugins.
|
* Reload the permissions manager, and re-hook all permission plugins.
|
||||||
*
|
*
|
||||||
e.
|
* @return True on success, false on failure.
|
||||||
* @return True on success, false on failure. */
|
*/
|
||||||
public boolean reload() {
|
public boolean reload() {
|
||||||
// Unhook all permission plugins
|
// Unhook all permission plugins
|
||||||
unhook();
|
unhook();
|
||||||
@ -299,8 +302,8 @@ public class PermissionsManager {
|
|||||||
/**
|
/**
|
||||||
* Get the logger instance.
|
* Get the logger instance.
|
||||||
*
|
*
|
||||||
e.
|
* @return Logger instance.
|
||||||
* @return Logger instance. */
|
*/
|
||||||
public Logger getLogger() {
|
public Logger getLogger() {
|
||||||
return this.log;
|
return this.log;
|
||||||
}
|
}
|
||||||
@ -320,8 +323,8 @@ public class PermissionsManager {
|
|||||||
* @param player The player.
|
* @param player The player.
|
||||||
* @param permsNode Permissions node.
|
* @param permsNode Permissions node.
|
||||||
*
|
*
|
||||||
n.
|
* @return True if the player has permission.
|
||||||
* @return True if the player has permission. */
|
*/
|
||||||
public boolean hasPermission(Player player, String permsNode) {
|
public boolean hasPermission(Player player, String permsNode) {
|
||||||
return hasPermission(player, permsNode, player.isOp());
|
return hasPermission(player, permsNode, player.isOp());
|
||||||
}
|
}
|
||||||
@ -333,8 +336,8 @@ public class PermissionsManager {
|
|||||||
* @param permsNode The permission node.
|
* @param permsNode The permission node.
|
||||||
* @param def Default returned if no permissions system is used.
|
* @param def Default returned if no permissions system is used.
|
||||||
*
|
*
|
||||||
n.
|
* @return True if the player has permission.
|
||||||
* @return True if the player has permission. */
|
*/
|
||||||
public boolean hasPermission(Player player, String permsNode, boolean def) {
|
public boolean hasPermission(Player player, String permsNode, boolean def) {
|
||||||
if(!isEnabled())
|
if(!isEnabled())
|
||||||
// No permissions system is used, return default
|
// No permissions system is used, return default
|
||||||
@ -388,9 +391,11 @@ public class PermissionsManager {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Method getGroups.
|
* Method getGroups.
|
||||||
* @param player Player
|
*
|
||||||
g>
|
* @param player Player.
|
||||||
* @return List<String> */
|
*
|
||||||
|
* @return Groups.
|
||||||
|
*/
|
||||||
@SuppressWarnings({"unchecked", "rawtypes", "deprecation"})
|
@SuppressWarnings({"unchecked", "rawtypes", "deprecation"})
|
||||||
public List<String> getGroups(Player player) {
|
public List<String> getGroups(Player player) {
|
||||||
if(!isEnabled())
|
if(!isEnabled())
|
||||||
@ -437,8 +442,6 @@ public class PermissionsManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
public enum PermissionsSystemType {
|
public enum PermissionsSystemType {
|
||||||
NONE("None"),
|
NONE("None"),
|
||||||
PERMISSIONS_EX("PermissionsEx"),
|
PERMISSIONS_EX("PermissionsEx"),
|
||||||
@ -453,6 +456,7 @@ public class PermissionsManager {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor for PermissionsSystemType.
|
* Constructor for PermissionsSystemType.
|
||||||
|
*
|
||||||
* @param name String
|
* @param name String
|
||||||
*/
|
*/
|
||||||
PermissionsSystemType(String name) {
|
PermissionsSystemType(String name) {
|
||||||
@ -461,8 +465,9 @@ public class PermissionsManager {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Method getName.
|
* Method getName.
|
||||||
ng
|
*
|
||||||
* @return String */
|
* @return String
|
||||||
|
*/
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return this.name;
|
return this.name;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user