File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/main/kotlin/com/mairwunnx/projectessentials/permissions/api/v1 Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ object PermissionsAPI {
32
32
* @return true if group with specified name exist.
33
33
* @since 2.0.0-SNAPSHOT.1.
34
34
*/
35
- fun groupExist (name : String ) = permissions.take().groups .filter { it.name == name }.count() > 0
35
+ fun groupExist (name : String ) = getGroups() .filter { it.name == name }.count() > 0
36
36
37
37
/* *
38
38
* @return default group data model instance.
@@ -405,7 +405,7 @@ object PermissionsAPI {
405
405
* @since 2.0.0-SNAPSHOT.1.
406
406
*/
407
407
fun setUserGroup (name : String , groupName : String ): Boolean {
408
- if (! groupExist(name )) return false
408
+ if (! groupExist(groupName )) return false
409
409
if (getUserGroup(name) == groupName) return false
410
410
411
411
if (! userExist(name)) addUser(User (name, groupName, mutableListOf ()))
You can’t perform that action at this time.
0 commit comments