Class FutureBattleTask<E extends BattleEvent,A> 
java.lang.Object
com.pixelmonmod.pixelmon.battles.controller.FutureBattleTask<E,A> 
- Type Parameters:
- E- The type of event to listen for
- A- The type returned from the function
This class is used for storing the future tasks added to the battle
 When the event relating to the stored event class (E) is fired it will call
 the function and then 
CompletableFuture.complete(Object) with the returned object in that order
 Then it will remove the future battle task from the stored list of tasks- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected final BiFunction<E,BattleController, A> protected final CompletableFuture<A>protected final boolean
- 
Constructor SummaryConstructorsConstructorDescriptionFutureBattleTask(Class<E> eventClass, BiFunction<E, BattleController, A> consumer, CompletableFuture<A> future, boolean persistent) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidboolean
- 
Field Details- 
eventClass
- 
consumer
- 
future
- 
persistentprotected final boolean persistent
 
- 
- 
Constructor Details- 
FutureBattleTaskpublic FutureBattleTask(Class<E> eventClass, BiFunction<E, BattleController, A> consumer, CompletableFuture<A> future, boolean persistent) 
 
- 
- 
Method Details- 
getEventClass
- 
isPersistentpublic boolean isPersistent()
- 
complete
 
-