mirror of
https://github.com/KAMKEEL/CustomNPC-Plus-API.git
synced 2026-11-16 10:44:47 +00:00
IActionManager and IAction QoL
This commit is contained in:
1 parent
8ad0c21ef4
commit
4d8b345a42
2 files changed
+33
-5
No files matched your search
@@ -118,16 +118,35 @@ public interface IActionManager {
|
||||
*/
|
||||
IAction scheduleAction(IAction action);
|
||||
|
||||
/**
|
||||
* Convenience for {@link #create(String, Consumer)} + enqueue.
|
||||
*
|
||||
* @param name a unique name for this action
|
||||
* @param task code to execute each time the task "fires"
|
||||
* @return the task scheduled
|
||||
*/
|
||||
IAction scheduleAction(String name, Consumer<IAction> task);
|
||||
|
||||
/**
|
||||
* Convenience for {@link #create(String, int, Consumer)} + enqueue.
|
||||
*
|
||||
* @param name a unique name for this action
|
||||
* @param startAfterTicks number of ticks to wait before the first task run
|
||||
* @param task code to execute each time the task "fires"
|
||||
* @return the task scheduled
|
||||
*/
|
||||
IAction scheduleAction(String name, int startAfterTicks, Consumer<IAction> task);
|
||||
|
||||
/**
|
||||
* Convenience for {@link #create(String, int, int, Consumer)} + enqueue.
|
||||
*
|
||||
* @param name a unique name for this action
|
||||
* @param maxDuration the maximum lifetime of the action in ticks
|
||||
* @param startAfterTicks number of ticks to wait before the first run
|
||||
* @param action code to execute each time the action "fires"
|
||||
* @return the action scheduled
|
||||
* @param startAfterTicks number of ticks to wait before the first task run
|
||||
* @param task code to execute each time the task "fires"
|
||||
* @return the task scheduled
|
||||
*/
|
||||
IAction scheduleAction(String name, int maxDuration, int startAfterTicks, Consumer<IAction> action);
|
||||
IAction scheduleAction(String name, int maxDuration, int startAfterTicks, Consumer<IAction> task);
|
||||
|
||||
/**
|
||||
* Insert an action at a specific position in the queue.
|
||||
|
||||
Reference in new issue
Block a user