From 3efd012ae0c465ff39ccfa85986ea966cc1bfa26 Mon Sep 17 00:00:00 2001 From: bigguy345 Date: Sat, 28 Jun 2025 09:30:20 +0300 Subject: [PATCH] Added ActionThread IActions can now be threaded using action.threadify() --- java/noppes/npcs/api/handler/data/IAction.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/java/noppes/npcs/api/handler/data/IAction.java b/java/noppes/npcs/api/handler/data/IAction.java index 434b685..327e2f1 100644 --- a/java/noppes/npcs/api/handler/data/IAction.java +++ b/java/noppes/npcs/api/handler/data/IAction.java @@ -94,10 +94,20 @@ public interface IAction { /** * @param ticks pauses action for this number of ticks (any subsequent action is paused too) + * If action is threaded using threadify(), sleeps the thread. * @return */ IAction pauseFor(int ticks); + IAction pauseFor(long millis); + + boolean isPaused(); + + /** + * Creates a new thread for task to run into. Allows for pausing and sleeping the thread. + */ + void threadify(); + /** * @return the next action in the queue (or null if none or at end) */