mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-10-31 07:39:42 +01:00
Added group support check to setGroups method in Utils class
This commit is contained in:
parent
eaba2765fa
commit
6dc4066563
@ -129,14 +129,16 @@ public class Utils {
|
|||||||
if(!Settings.isPermissionCheckEnabled)
|
if(!Settings.isPermissionCheckEnabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// TODO: Make sure a groups system is used!
|
|
||||||
|
|
||||||
// Get the permissions manager, and make sure it's valid
|
// Get the permissions manager, and make sure it's valid
|
||||||
PermissionsManager permsMan = plugin.getPermissionsManager();
|
PermissionsManager permsMan = plugin.getPermissionsManager();
|
||||||
if(permsMan == null)
|
if(permsMan == null)
|
||||||
ConsoleLogger.showError("Failed to access permissions manager instance, shutting down.");
|
ConsoleLogger.showError("Failed to access permissions manager instance, shutting down.");
|
||||||
assert permsMan != null;
|
assert permsMan != null;
|
||||||
|
|
||||||
|
// Make sure group support is available
|
||||||
|
if(!permsMan.hasGroupSupport())
|
||||||
|
ConsoleLogger.showError("The current permissions system doesn't have group support, unable to set group!");
|
||||||
|
|
||||||
switch(group) {
|
switch(group) {
|
||||||
case UNREGISTERED:
|
case UNREGISTERED:
|
||||||
// Remove the other group type groups, set the current group
|
// Remove the other group type groups, set the current group
|
||||||
|
Loading…
Reference in New Issue
Block a user