mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2026-11-13 23:04:05 +00:00
change weight node
This commit is contained in:
1 parent
171a54c0fc
commit
060fa6e5f7
1 file changed
+2
-2
@@ -1115,8 +1115,8 @@ public abstract class PermissionHolder {
|
||||
OptionalInt weight = OptionalInt.empty();
|
||||
try {
|
||||
weight = getNodes().stream()
|
||||
.filter(n -> n.getPermission().startsWith("group.weight."))
|
||||
.map(n -> n.getPermission().substring("group.weight.".length()))
|
||||
.filter(n -> n.getPermission().startsWith("weight."))
|
||||
.map(n -> n.getPermission().substring("weight.".length()))
|
||||
.mapToInt(Integer::parseInt)
|
||||
.max();
|
||||
} catch (Exception ignored) {}
|
||||
|
||||
Reference in new issue
Block a user