How can i get the Expire date from an temporary added group using /user xy parent addtemp? Cant ask on discord right now because i am blocked.
einfachBlu opened this issue ยท 12 comments
Blu#0002, if i remember correct. But i am disabled and have no access for the next 1-2 days
No Problem.
@Laarryy you may know how to receive the duration over the api? i have seen a Node Object with expire fields. but there is no NodeType for PermissionGroup. Just for Permission, chat and some other things
Oh, thx. I thought it is just for the inheritances, not for the permissiongroup itself. I will try that!
I suggest you
lpUser.getNodes(NodeType.INHERITANCE)
.stream()
.filter(Node::hasExpiry)
.filter(node -> !node.hasExpired())
.collect(Collectors.toList());
It will return a List<InheritanceNode>
with the user's parent group nodes that have an expiry and have not expired yet. Why a list? Well you can have multiple or no parent groups with an expiry time.