From e6a90a18c42f1aac774104a678a870f68a92724c Mon Sep 17 00:00:00 2001 From: Luck Date: Sun, 26 Feb 2017 01:16:54 +0000 Subject: [PATCH] Sort subjects properly --- .../me/lucko/luckperms/sponge/service/LuckPermsService.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sponge/src/main/java/me/lucko/luckperms/sponge/service/LuckPermsService.java b/sponge/src/main/java/me/lucko/luckperms/sponge/service/LuckPermsService.java index 971ab9ea..520ec904 100644 --- a/sponge/src/main/java/me/lucko/luckperms/sponge/service/LuckPermsService.java +++ b/sponge/src/main/java/me/lucko/luckperms/sponge/service/LuckPermsService.java @@ -216,7 +216,7 @@ public class LuckPermsService implements PermissionService { public List sortSubjects(List s) { List 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); }