Fix PermissionHolder#setNode with accumulate temporary modifier (#1839)

This commit is contained in:
Luck 2019-12-24 17:54:35 +00:00
parent cc5d7ea873
commit 8906e4c4fc
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -441,6 +441,7 @@ public abstract class PermissionHolder {
// Create a new Node with the same properties, but add the expiry dates together
long newExpiry = otherMatch.getExpiry().plus(Duration.between(Instant.now(), node.getExpiry())).getEpochSecond();
newNode = node.toBuilder().expiry(newExpiry).build();
break;
}
case REPLACE_EXISTING_IF_DURATION_LONGER: {
// Only replace if the new expiry time is greater than the old one.