mirror of
https://github.com/KAMKEEL/CustomNPC-Plus-API.git
synced 2026-11-15 11:24:44 +00:00
Added killWhenEmpty and killAfterTicks to IActionQueue
This commit is contained in:
1 parent
1b96a3dc87
commit
049253f1fd
1 file changed
+23
@@ -18,6 +18,29 @@ public interface IActionQueue {
|
||||
|
||||
Queue<IAction> getQueue();
|
||||
|
||||
IActionQueue setParallel(boolean parallel);
|
||||
|
||||
/**
|
||||
* @return True to auto-remove this queue from the IActionManager when no IActions are scheduled or queue is empty
|
||||
* Default: true
|
||||
*/
|
||||
boolean isKilledWhenEmpty();
|
||||
|
||||
/**
|
||||
* @return ticks it takes to remove this queue from IActionManager after {{@link #isKilledWhenEmpty()}} is satisfied
|
||||
* If an IAction is scheduled after it's satisfied, the kill process is aborted.
|
||||
* Default: 100 ticks
|
||||
*/
|
||||
int getKillAfterTicks();
|
||||
|
||||
IActionQueue killWhenEmpty(boolean killWhenEmpty);
|
||||
|
||||
/**
|
||||
* @param ticks to set killAfterTicks
|
||||
* @return
|
||||
*/
|
||||
IActionQueue killAfter(int ticks);
|
||||
|
||||
IAction schedule(IAction action);
|
||||
|
||||
void schedule(IAction... actions);
|
||||
|
||||
Reference in new issue
Block a user