mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 02:37:27 +00:00
refactored IAction.scheduleAfter and scheduleBefore to just after and before
This commit is contained in:
1 parent
65fef1778e
commit
9b846c314d
2 files changed
+7
-3
No files matched your search
@@ -273,15 +273,19 @@ public class ScriptedActionManager implements IActionManager {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void scheduleAfter(IAction after) {
|
||||
public IAction after(IAction after) {
|
||||
int idx = getIndex(this);
|
||||
if (idx >= 0) scheduleActionAt(idx + 1, after);
|
||||
return after;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void scheduleBefore(IAction before) {
|
||||
public IAction before(IAction before) {
|
||||
int idx = getIndex(this);
|
||||
if (idx >= 0) scheduleActionAt(Math.max(0, idx), before);
|
||||
return before;
|
||||
}
|
||||
|
||||
private final java.util.Map<String, Object> dataStore = new java.util.HashMap<>();
|
||||
|
||||
Reference in new issue
Block a user