Fixed formatting in PermissionsManager class

This commit is contained in:
Tim Visée 2015-11-21 02:43:32 +01:00
parent 5ff9b7550e
commit 06d6bd4a7e

View File

@ -61,14 +61,17 @@ public class PermissionsManager {
* Essentials group manager instance.
*/
private GroupManager groupManagerPerms;
/**
* Permissions manager instance for the legacy permissions system.
*/
private PermissionHandler defaultPerms;
/**
* zPermissions service instance.
*/
private ZPermissionsService zPermissionsService;
/**
* Vault instance.
*/
@ -90,8 +93,8 @@ public class PermissionsManager {
/**
* 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() {
return !permsType.equals(PermissionsSystemType.NONE);
}
@ -99,8 +102,8 @@ public class PermissionsManager {
/**
* Return the permissions system where the permissions manager is currently hooked into.
*
e.
* @return Permissions system type. */
* @return Permissions system type.
*/
public PermissionsSystemType getUsedPermissionsSystemType() {
return this.permsType;
}
@ -108,8 +111,8 @@ public class PermissionsManager {
/**
* Setup and hook into the permissions systems.
*
m.
* @return The detected permissions system. */
* @return The detected permissions system.
*/
public PermissionsSystemType setup() {
// Define the plugin manager
final PluginManager pm = this.server.getPluginManager();
@ -245,8 +248,8 @@ public class PermissionsManager {
/**
* 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() {
// Unhook all permission plugins
unhook();
@ -299,8 +302,8 @@ public class PermissionsManager {
/**
* Get the logger instance.
*
e.
* @return Logger instance. */
* @return Logger instance.
*/
public Logger getLogger() {
return this.log;
}
@ -320,8 +323,8 @@ public class PermissionsManager {
* @param player The player.
* @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) {
return hasPermission(player, permsNode, player.isOp());
}
@ -333,8 +336,8 @@ public class PermissionsManager {
* @param permsNode The permission node.
* @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) {
if(!isEnabled())
// No permissions system is used, return default
@ -388,9 +391,11 @@ public class PermissionsManager {
/**
* Method getGroups.
* @param player Player
g>
* @return List<String> */
*
* @param player Player.
*
* @return Groups.
*/
@SuppressWarnings({"unchecked", "rawtypes", "deprecation"})
public List<String> getGroups(Player player) {
if(!isEnabled())
@ -437,8 +442,6 @@ public class PermissionsManager {
}
}
/**
*/
public enum PermissionsSystemType {
NONE("None"),
PERMISSIONS_EX("PermissionsEx"),
@ -453,6 +456,7 @@ public class PermissionsManager {
/**
* Constructor for PermissionsSystemType.
*
* @param name String
*/
PermissionsSystemType(String name) {
@ -461,8 +465,9 @@ public class PermissionsManager {
/**
* Method getName.
ng
* @return String */
*
* @return String
*/
public String getName() {
return this.name;
}