LuckPerms

LuckPerms

41.4k Downloads

Cannot add custom subject as parent to user (Sponge)

ItsDoot opened this issue ยท 3 comments

commented

Steps to reproduce:

  1. Using Sponge's PermissionService, create a new SubjectCollection using collection = service.loadCollection("foo") (name doesn't matter).
  2. Create a subject using subject = collection.loadSubject("bar") (name doesn't matter).
  3. When a player logs in, run player.addParent(new HashSet<>(), subject.asSubjectReference()) which will return false, meaning it failed to add the parent.

I would like to use a custom SubjectCollection for representing a town's custom-made ranks, otherwise using plain groups would infect tab completion when using LP group commands.

commented

Are there any plans to fully support it in the future?

commented

The common storage system in LP doesn't support adding anything other than groups as parents for users/groups, which is why parents with a collection other than user or group is only supported for custom subject types.

commented

If I'm honest, probably not.

I'd accept a good PR implementing this, but it's not something I have time to work on myself - sorry!