Cannot add custom subject as parent to user (Sponge)
Closed this issue ยท 3 comments
Steps to reproduce:
- Using Sponge's
PermissionService
, create a newSubjectCollection
usingcollection = service.loadCollection("foo")
(name doesn't matter). - Create a subject using
subject = collection.loadSubject("bar")
(name doesn't matter). - 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.
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.