mirror of
https://github.com/KAMKEEL/CustomNPC-Plus-API.git
synced 2026-11-16 11:54:48 +00:00
Added varargs chaining to IActions
i.e schedule(act1,act2,act3...)
This commit is contained in:
1 parent
f0f1c9c917
commit
a588062c98
2 files changed
+56
No files matched your search
@@ -113,6 +113,14 @@ public interface IActionManager {
|
||||
*/
|
||||
void stop();
|
||||
|
||||
/**
|
||||
* Multiple actions chained one after another
|
||||
* i.e schedule(act1,act2,act3,...)
|
||||
*
|
||||
* @param actions
|
||||
*/
|
||||
void schedule(IAction... actions);
|
||||
|
||||
/**
|
||||
* Schedule an existing action for execution.
|
||||
*
|
||||
@@ -121,6 +129,14 @@ public interface IActionManager {
|
||||
*/
|
||||
IAction schedule(IAction action);
|
||||
|
||||
/**
|
||||
* Multiple tasks chained one after another
|
||||
* i.e schedule(task1,task2,task3,...)
|
||||
*
|
||||
* @param tasks
|
||||
*/
|
||||
void schedule(Consumer<IAction>... tasks);
|
||||
|
||||
/**
|
||||
* Convenience for {@link #create(Consumer)} + enqueue.
|
||||
*
|
||||
@@ -274,6 +290,14 @@ public interface IActionManager {
|
||||
*/
|
||||
IConditionalAction schedule(String name, Function<IAction, Boolean> condition, Consumer<IAction> task, Function<IAction, Boolean> terminateWhen, Consumer<IAction> onTermination);
|
||||
|
||||
/**
|
||||
* Multiple conditionals
|
||||
* i.e schedule(act1,act2,act3,...)
|
||||
*
|
||||
* @param actions
|
||||
*/
|
||||
void schedule(IConditionalAction... actions);
|
||||
|
||||
IConditionalAction schedule(IConditionalAction action);
|
||||
|
||||
/**
|
||||
@@ -313,6 +337,14 @@ public interface IActionManager {
|
||||
*/
|
||||
boolean hasConditional(String name);
|
||||
|
||||
/**
|
||||
* Multiple actions in parallel
|
||||
* i.e scheduleParallel(act1,act2,act3,...)
|
||||
*
|
||||
* @param actions
|
||||
*/
|
||||
void scheduleParallel(IAction... actions);
|
||||
|
||||
/**
|
||||
* Schedules actions on the parallelQueue, where all actions are executed simultaneously
|
||||
*
|
||||
@@ -322,6 +354,8 @@ public interface IActionManager {
|
||||
|
||||
IAction scheduleParallel(IAction action);
|
||||
|
||||
void scheduleParallel(Consumer<IAction>... tasks);
|
||||
|
||||
IAction scheduleParallel(Consumer<IAction> task);
|
||||
|
||||
IAction scheduleParallel(int delay, Consumer<IAction> task);
|
||||
|
||||
Reference in new issue
Block a user