aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/src/main/java/dev/isxander/yacl3/impl/OptionImpl.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/common/src/main/java/dev/isxander/yacl3/impl/OptionImpl.java b/common/src/main/java/dev/isxander/yacl3/impl/OptionImpl.java
index e539f73..afe9517 100644
--- a/common/src/main/java/dev/isxander/yacl3/impl/OptionImpl.java
+++ b/common/src/main/java/dev/isxander/yacl3/impl/OptionImpl.java
@@ -89,8 +89,12 @@ public final class OptionImpl<T> implements Option<T> {
this.available = available;
- if (changed)
- this.triggerListeners(false);
+ if (changed) {
+ if (!available) {
+ this.pendingValue = binding().getValue();
+ }
+ this.triggerListeners(!available);
+ }
}
@Override