mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-28 13:45:20 +01:00
change weight node
This commit is contained in:
parent
171a54c0fc
commit
060fa6e5f7
@ -1115,8 +1115,8 @@ public abstract class PermissionHolder {
|
|||||||
OptionalInt weight = OptionalInt.empty();
|
OptionalInt weight = OptionalInt.empty();
|
||||||
try {
|
try {
|
||||||
weight = getNodes().stream()
|
weight = getNodes().stream()
|
||||||
.filter(n -> n.getPermission().startsWith("group.weight."))
|
.filter(n -> n.getPermission().startsWith("weight."))
|
||||||
.map(n -> n.getPermission().substring("group.weight.".length()))
|
.map(n -> n.getPermission().substring("weight.".length()))
|
||||||
.mapToInt(Integer::parseInt)
|
.mapToInt(Integer::parseInt)
|
||||||
.max();
|
.max();
|
||||||
} catch (Exception ignored) {}
|
} catch (Exception ignored) {}
|
||||||
|
Loading…
Reference in New Issue
Block a user