We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 707e710 commit 44d0da5Copy full SHA for 44d0da5
1 file changed
cloud-minecraft/cloud-bukkit/src/main/java/cloud/commandframework/bukkit/BukkitCommandPreprocessor.java
@@ -81,9 +81,10 @@ public void accept(final @NonNull CommandPreprocessingContext<C> context) {
81
);
82
83
// Store if PaperCommandManager's preprocessor didn't already
84
- if (!context.commandContext().contains(BukkitCommandContextKeys.SENDER_SCHEDULER_EXECUTOR)) {
85
- context.commandContext().store(BukkitCommandContextKeys.SENDER_SCHEDULER_EXECUTOR, this.mainThreadExecutor());
86
- }
+ context.commandContext().computeIfAbsent(
+ BukkitCommandContextKeys.SENDER_SCHEDULER_EXECUTOR,
+ $ -> this.mainThreadExecutor()
87
+ );
88
}
89
90
private Executor mainThreadExecutor() {
0 commit comments