mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-09 12:30:15 +01:00
hopefully fix server stopped responding error with SkipListSet
This commit is contained in:
parent
02d9b996a7
commit
35cb5b81dc
@ -39,7 +39,6 @@ import me.lucko.luckperms.groups.Group;
|
|||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.concurrent.ConcurrentSkipListSet;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -139,8 +138,7 @@ public abstract class PermissionHolder {
|
|||||||
* @return a set of nodes
|
* @return a set of nodes
|
||||||
*/
|
*/
|
||||||
public SortedSet<Node> getAllNodes(List<String> excludedGroups) {
|
public SortedSet<Node> getAllNodes(List<String> excludedGroups) {
|
||||||
SortedSet<Node> all = new ConcurrentSkipListSet<>(PRIORITY_COMPARATOR);
|
SortedSet<Node> all = getPermissions();
|
||||||
all.addAll(getPermissions());
|
|
||||||
|
|
||||||
if (excludedGroups == null) {
|
if (excludedGroups == null) {
|
||||||
excludedGroups = new ArrayList<>();
|
excludedGroups = new ArrayList<>();
|
||||||
@ -536,6 +534,10 @@ public abstract class PermissionHolder {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int compare(Node o1, Node o2) {
|
public int compare(Node o1, Node o2) {
|
||||||
|
if (o1.equals(o2)) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (o1.isOverride() != o2.isOverride()) {
|
if (o1.isOverride() != o2.isOverride()) {
|
||||||
return o1.isOverride() ? 1 : -1;
|
return o1.isOverride() ? 1 : -1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user