Package net.citizensnpcs.api.ai
Class SimpleBehaviorController
java.lang.Object
net.citizensnpcs.api.ai.SimpleBehaviorController
- All Implemented Interfaces:
Runnable,BehaviorController
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBehavior(Behavior behavior) Registers aBehavior.voidclear()Clears the goal controller of allBehaviors.booleanisPaused()voidremoveBehavior(Behavior behavior) Removes the givenBehaviorfrom rotation.voidrun()voidsetPaused(boolean paused) Sets whether the controller is paused.
-
Constructor Details
-
SimpleBehaviorController
public SimpleBehaviorController()
-
-
Method Details
-
addBehavior
Description copied from interface:BehaviorControllerRegisters aBehavior.- Specified by:
addBehaviorin interfaceBehaviorController- Parameters:
behavior- The behavior
-
clear
public void clear()Description copied from interface:BehaviorControllerClears the goal controller of allBehaviors. Will stop the execution of any current behavior.- Specified by:
clearin interfaceBehaviorController
-
isPaused
public boolean isPaused()- Specified by:
isPausedin interfaceBehaviorController- Returns:
- Whether the controller is currently paused
- See Also:
-
removeBehavior
Description copied from interface:BehaviorControllerRemoves the givenBehaviorfrom rotation.- Specified by:
removeBehaviorin interfaceBehaviorController- Parameters:
behavior- The behavior to remove
-
run
public void run() -
setPaused
public void setPaused(boolean paused) Description copied from interface:BehaviorControllerSets whether the controller is paused. While paused, no newBehaviors will be selected and any executing goals will be suspended.- Specified by:
setPausedin interfaceBehaviorController- Parameters:
paused- Whether to pause execution
-