Make CommandExecutionHandler#executeFuture return CompletableFuture<Void> instead of CompletableFuture<Object>
The value of the completed future is never used, void makes this more obvious
This commit is contained in:
parent
9e39b0ca8e
commit
a92ff9d39a
2 changed files with 6 additions and 5 deletions
|
|
@ -54,8 +54,8 @@ public interface CommandExecutionHandler<C> {
|
|||
* @return future that completes when the command has finished execution
|
||||
* @since 1.6.0
|
||||
*/
|
||||
default CompletableFuture<@Nullable Object> executeFuture(@NonNull CommandContext<C> commandContext) {
|
||||
final CompletableFuture<Object> future = new CompletableFuture<>();
|
||||
default CompletableFuture<@Nullable Void> executeFuture(@NonNull CommandContext<C> commandContext) {
|
||||
final CompletableFuture<Void> future = new CompletableFuture<>();
|
||||
try {
|
||||
this.execute(commandContext);
|
||||
/* The command executed successfully */
|
||||
|
|
@ -97,7 +97,7 @@ public interface CommandExecutionHandler<C> {
|
|||
}
|
||||
|
||||
@Override
|
||||
CompletableFuture<@Nullable Object> executeFuture(
|
||||
CompletableFuture<@Nullable Void> executeFuture(
|
||||
@NonNull CommandContext<C> commandContext
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue