mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2026-11-25 09:54:21 +00:00
getGroup methods should not include inherited groups
This commit is contained in:
2 files changed
+9
-5
No files matched your search
@@ -329,7 +329,9 @@ public abstract class User extends PermissionHolder implements Identifiable<UUID
|
||||
*/
|
||||
public List<String> getGroups(String server, String world, boolean includeGlobal) {
|
||||
// Call super #getPermissions method, and just sort through those
|
||||
return getAllNodesFiltered(server, world, Collections.emptyMap(), includeGlobal, true).stream()
|
||||
return getNodes().stream()
|
||||
.filter(n -> n.shouldApplyOnWorld(world, includeGlobal, true))
|
||||
.filter(n -> n.shouldApplyOnServer(server, includeGlobal, true))
|
||||
.filter(Node::isGroupNode)
|
||||
.map(Node::getGroupName)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
Reference in new issue
Block a user