Skip to content

Commit

Permalink
style(prettier): prettified code
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurfiorette authored and actions-user committed Aug 26, 2021
1 parent d9ec305 commit e0785c2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,9 @@ public void enable() throws Exception {
public void disable() throws Exception {
HandlerList.unregisterAll(this);
}

public <E extends Event> CompletableFuture<E> waitEvent(
final Class<E> event
) {
return this.waitingEvent(event, (e) -> true).getFuture();

public <E extends Event> CompletableFuture<E> waitEvent(final Class<E> event) {
return this.waitingEvent(event, e -> true).getFuture();
}

public <E extends Event> CompletableFuture<E> waitEvent(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,18 @@ public void disable() throws Exception {
}

public CompletableFuture<E> waitEvent() {
return this.waitingEvent((e) -> true).getFuture();
return this.waitingEvent(e -> true).getFuture();
}

public CompletableFuture<E> waitEvent(final Predicate<E> test) {
return this.waitingEvent(test).getFuture();
}

public CompletableFuture<E> waitEvent(final Predicate<E> test, final long delay, final TimeUnit unit) {
public CompletableFuture<E> waitEvent(
final Predicate<E> test,
final long delay,
final TimeUnit unit
) {
final WaitingEvent<E> waitingEvent = this.waitingEvent(test);
schedulerExecutor.schedule(waitingEvent::exceptionallyTooLong, delay, unit);
return waitingEvent.getFuture();
Expand Down

0 comments on commit e0785c2

Please sign in to comment.