use of me.lucko.luckperms.sponge.model.SpongeGroup in project LuckPerms by lucko.
the class HolderSubject method getParents.
@Override
public ImmutableList<LPSubjectReference> getParents(ImmutableContextSet contexts) {
InheritanceGraph graph = this.plugin.getInheritanceHandler().getGraph(this.plugin.getContextManager().formContexts(contexts));
Iterable<PermissionHolder> traversal = graph.traverse(TraversalAlgorithm.DEPTH_FIRST_PRE_ORDER, this.parent);
ImmutableList.Builder<LPSubjectReference> subjects = ImmutableList.builder();
for (PermissionHolder parent : traversal) {
if (!(parent instanceof Group)) {
continue;
}
subjects.add(((SpongeGroup) parent).sponge().toReference());
}
return subjects.build();
}
Aggregations