mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-24 11:38:40 +01:00
Sort subjects properly
This commit is contained in:
parent
26afb69a14
commit
e6a90a18c4
@ -216,7 +216,7 @@ public class LuckPermsService implements PermissionService {
|
||||
|
||||
public List<Subject> sortSubjects(List<Subject> s) {
|
||||
List<Subject> ret = new ArrayList<>(s);
|
||||
ret.sort((o1, o2) -> {
|
||||
ret.sort(Collections.reverseOrder((o1, o2) -> {
|
||||
if (o1.equals(o2)) {
|
||||
return 0;
|
||||
}
|
||||
@ -248,8 +248,8 @@ public class LuckPermsService implements PermissionService {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return Integer.compare(g1.getWeight().orElse(0), g2.getWeight().orElse(0)) == -1 ? 1 : -1;
|
||||
});
|
||||
return Integer.compare(g1.getWeight().orElse(0), g2.getWeight().orElse(0)) == 1 ? 1 : -1;
|
||||
}));
|
||||
return ImmutableList.copyOf(ret);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user