mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2025-01-06 08:27:37 +01:00
Don't show negated group membership permissions in the output to 'user info' and 'group listmembers'
This commit is contained in:
parent
759ec5d499
commit
26973461e7
@ -85,8 +85,13 @@ public class GroupListMembers extends SubCommand<Group> {
|
|||||||
|
|
||||||
Message.SEARCH_SEARCHING_MEMBERS.send(sender, group.getName());
|
Message.SEARCH_SEARCHING_MEMBERS.send(sender, group.getName());
|
||||||
|
|
||||||
List<HeldPermission<UUID>> matchedUsers = plugin.getStorage().getUsersWithPermission(constraint).join();
|
List<HeldPermission<UUID>> matchedUsers = plugin.getStorage().getUsersWithPermission(constraint).join().stream()
|
||||||
List<HeldPermission<String>> matchedGroups = plugin.getStorage().getGroupsWithPermission(constraint).join();
|
.filter(HeldPermission::getValue)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
List<HeldPermission<String>> matchedGroups = plugin.getStorage().getGroupsWithPermission(constraint).join().stream()
|
||||||
|
.filter(HeldPermission::getValue)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
int users = matchedUsers.size();
|
int users = matchedUsers.size();
|
||||||
int groups = matchedGroups.size();
|
int groups = matchedGroups.size();
|
||||||
|
@ -47,7 +47,6 @@ import me.lucko.luckperms.common.utils.Predicates;
|
|||||||
import me.lucko.luckperms.common.verbose.event.MetaCheckEvent;
|
import me.lucko.luckperms.common.verbose.event.MetaCheckEvent;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
public class UserInfo extends SubCommand<User> {
|
public class UserInfo extends SubCommand<User> {
|
||||||
@ -73,15 +72,17 @@ public class UserInfo extends SubCommand<User> {
|
|||||||
user.getPrimaryGroup().getValue()
|
user.getPrimaryGroup().getValue()
|
||||||
);
|
);
|
||||||
|
|
||||||
Set<Node> parents = user.enduringData().asSet().stream()
|
List<Node> parents = user.enduringData().asSortedSet().stream()
|
||||||
.filter(Node::isGroupNode)
|
.filter(Node::isGroupNode)
|
||||||
|
.filter(Node::getValue)
|
||||||
.filter(Node::isPermanent)
|
.filter(Node::isPermanent)
|
||||||
.collect(Collectors.toSet());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
Set<Node> tempParents = user.enduringData().asSet().stream()
|
List<Node> tempParents = user.enduringData().asSortedSet().stream()
|
||||||
.filter(Node::isGroupNode)
|
.filter(Node::isGroupNode)
|
||||||
|
.filter(Node::getValue)
|
||||||
.filter(Node::isTemporary)
|
.filter(Node::isTemporary)
|
||||||
.collect(Collectors.toSet());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
if (!parents.isEmpty()) {
|
if (!parents.isEmpty()) {
|
||||||
Message.INFO_PARENT_HEADER.send(sender);
|
Message.INFO_PARENT_HEADER.send(sender);
|
||||||
|
Loading…
Reference in New Issue
Block a user