Files
CustomNPC-Plus-API/java/noppes/npcs/api/handler/data/actions/IConditionalAction.java
T
2025-04-28 08:24:03 +03:00

27 lines
883 B
Java
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package noppes.npcs.api.handler.data.actions;
import noppes.npcs.api.handler.data.IAction;
import java.util.function.Consumer;
import java.util.function.Supplier;
public interface IConditionalAction extends IAction {
/**
*
* @param maxChecks maximum times to test predicate before auto‐cancelling
* @return this action
*/
IConditionalAction setMaxChecks(int maxChecks);
IConditionalAction after(IConditionalAction after);
IConditionalAction after(Supplier<Boolean> predicate, Consumer<IAction> task);
IConditionalAction after(String name, Supplier<Boolean> predicate, Consumer<IAction> task);
IConditionalAction after(Supplier<Boolean> predicate, Supplier<Boolean> terminate, Consumer<IAction> task);
IConditionalAction after(String name, Supplier<Boolean> predicate, Supplier<Boolean> terminate, Consumer<IAction> task);
}