From 8906e4c4fc7612af70c58cf5f788fa59f946a822 Mon Sep 17 00:00:00 2001 From: Luck Date: Tue, 24 Dec 2019 17:54:35 +0000 Subject: [PATCH] Fix PermissionHolder#setNode with accumulate temporary modifier (#1839) --- .../java/me/lucko/luckperms/common/model/PermissionHolder.java | 1 + 1 file changed, 1 insertion(+) diff --git a/common/src/main/java/me/lucko/luckperms/common/model/PermissionHolder.java b/common/src/main/java/me/lucko/luckperms/common/model/PermissionHolder.java index b237eb950..30e53e1f2 100644 --- a/common/src/main/java/me/lucko/luckperms/common/model/PermissionHolder.java +++ b/common/src/main/java/me/lucko/luckperms/common/model/PermissionHolder.java @@ -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.