LuckPerms

LuckPerms

41.4k Downloads

Groups never deleted

bcotoras opened this issue ยท 2 comments

commented

I'm creating a mod and manage LuckPerms groups in there but when i create a group with:
groupManager.createAndLoad("MYGROUP");

The group is created without problem but i can't delete it after that. I can't delete it with web site, console command o directly with code:

Group group = groupManager.getGroup(myGroupName); groupManager.deleteGroup(group);

If i delte it from Web Site or by code, when i check it with the command "/lp info" i see that the group was deleted but if i delete another group with a command like "/lp deletegroup" or only generate a URL for the editor I can see again the info the groups appear again an never were deleted.

This problem not appear in the case when i create the group manually from the web site.

The link below is the log of my test server.
https://bytebin.lucko.me/J4n6dLfdhY

commented

I found what it's wrong with the groups problem but i don't know how can i fix the corrupted groups.

I has the next code to set a permission node into a group.

groupManager.modifyGroup(groupName, (Group group) -> {
    for(String permission : permissions) {
        PermissionNode node = PermissionNode.builder(permission).build();
        group.data().add(node);
    }
});

When i use a group name with some upper case and try to add a permission the permission doesn't add to this group and the group gets corrupted.

I solved that only adding .toLowerCase() to groupName but this solve the future groups but no solve the created groups that are corrupted.

I think it's a problem with the temporally nodes but i don't know how can I remove they or something like that.

commented

Thanks, should be fixed by the above commit.