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 {
3232 * @return true if group with specified name exist.
3333 * @since 2.0.0-SNAPSHOT.1.
3434 */
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
3636
3737 /* *
3838 * @return default group data model instance.
@@ -405,7 +405,7 @@ object PermissionsAPI {
405405 * @since 2.0.0-SNAPSHOT.1.
406406 */
407407 fun setUserGroup (name : String , groupName : String ): Boolean {
408- if (! groupExist(name )) return false
408+ if (! groupExist(groupName )) return false
409409 if (getUserGroup(name) == groupName) return false
410410
411411 if (! userExist(name)) addUser(User (name, groupName, mutableListOf ()))
You can’t perform that action at this time.
0 commit comments