X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Ffcp%2Fquelaton%2FGetConfigCommandImpl.java;h=e35fdec74520876ad96225192803d0e8f8849263;hb=bfc572d27b7fa9b55ca082981666d83bdde1065f;hp=2d03b2ac93813661eba100f733ccffefcd5aeb25;hpb=8d70659996b99bd55b677e7235005bc0fcb05e1b;p=jFCPlib.git diff --git a/src/main/java/net/pterodactylus/fcp/quelaton/GetConfigCommandImpl.java b/src/main/java/net/pterodactylus/fcp/quelaton/GetConfigCommandImpl.java index 2d03b2a..e35fdec 100644 --- a/src/main/java/net/pterodactylus/fcp/quelaton/GetConfigCommandImpl.java +++ b/src/main/java/net/pterodactylus/fcp/quelaton/GetConfigCommandImpl.java @@ -26,6 +26,7 @@ public class GetConfigCommandImpl implements GetConfigCommand { private final AtomicBoolean withDefaults = new AtomicBoolean(); private final AtomicBoolean withSortOrder = new AtomicBoolean(); private final AtomicBoolean withExpertFlag = new AtomicBoolean(); + private final AtomicBoolean withForceWriteFlag = new AtomicBoolean(); public GetConfigCommandImpl(ExecutorService threadPool, ConnectionSupplier connectionSupplier) { this.threadPool = MoreExecutors.listeningDecorator(threadPool); @@ -57,6 +58,12 @@ public class GetConfigCommandImpl implements GetConfigCommand { } @Override + public GetConfigCommand withForceWriteFlag() { + withForceWriteFlag.set(true); + return this; + } + + @Override public ListenableFuture execute() { return threadPool.submit(this::executeDialog); } @@ -67,6 +74,7 @@ public class GetConfigCommandImpl implements GetConfigCommand { getConfig.setWithDefaults(withDefaults.get()); getConfig.setWithSortOrder(withSortOrder.get()); getConfig.setWithExpertFlag(withExpertFlag.get()); + getConfig.setWithForceWriteFlag(withForceWriteFlag.get()); try (GetConfigDialog getConfigDialog = new GetConfigDialog()) { return getConfigDialog.send(getConfig).get(); }