mirror of
https://github.com/KAMKEEL/CustomNPC-Plus-API.git
synced 2026-11-16 17:44:47 +00:00
ActionManager refactor + more features
This commit is contained in:
1 parent
0841aab8f8
commit
c81e848895
2 files changed
+19
-17
No files matched your search
@@ -37,10 +37,8 @@ public interface IAction {
|
||||
|
||||
/**
|
||||
* Marks the action as completed or not.
|
||||
*
|
||||
* @param done true to mark the action as done, false otherwise.
|
||||
*/
|
||||
void setDone(boolean done);
|
||||
void markDone();
|
||||
|
||||
/**
|
||||
* Checks if the action has been marked as completed.
|
||||
@@ -97,10 +95,21 @@ public interface IAction {
|
||||
*/
|
||||
IAction create(String name, int maxDuration, int startAfterTicks, Consumer<IAction> action);
|
||||
|
||||
IAction getNext();
|
||||
|
||||
IAction getPrevious();
|
||||
|
||||
/**
|
||||
* Schedules another action to be executed immediately after this action.
|
||||
*
|
||||
* @param action the action to schedule after this one.
|
||||
* @param after the action to schedule after this one.
|
||||
*/
|
||||
void scheduleAfter(IAction action);
|
||||
void scheduleAfter(IAction after);
|
||||
|
||||
/**
|
||||
* Schedules an action to be executed before current action, which pauses current until before finishes.
|
||||
*
|
||||
* @param before the action to schedule before this one.
|
||||
*/
|
||||
void scheduleBefore(IAction before);
|
||||
}
|
||||
Reference in new issue
Block a user