From 6dc406656312c511fa526936ce37ea47c6e88168 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Vis=C3=A9e?= Date: Sat, 21 Nov 2015 16:08:41 +0100 Subject: [PATCH] Added group support check to setGroups method in Utils class --- src/main/java/fr/xephi/authme/util/Utils.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/fr/xephi/authme/util/Utils.java b/src/main/java/fr/xephi/authme/util/Utils.java index af15b8e5d..278cf41af 100644 --- a/src/main/java/fr/xephi/authme/util/Utils.java +++ b/src/main/java/fr/xephi/authme/util/Utils.java @@ -129,14 +129,16 @@ public class Utils { if(!Settings.isPermissionCheckEnabled) return; - // TODO: Make sure a groups system is used! - // Get the permissions manager, and make sure it's valid PermissionsManager permsMan = plugin.getPermissionsManager(); if(permsMan == null) ConsoleLogger.showError("Failed to access permissions manager instance, shutting down."); 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) { case UNREGISTERED: // Remove the other group type groups, set the current group