Class ExecuteRandomActionAction

java.lang.Object
de.oliver.fancynpcs.api.actions.NpcAction
de.oliver.fancynpcs.api.actions.types.ExecuteRandomActionAction

public class ExecuteRandomActionAction extends NpcAction
The ExecuteRandomActionAction class represents an action that can be executed randomly by an NPC.

The ExecuteRandomActionAction class provides an implementation for the execute method, which executes a random action triggered by the given action trigger on the specified NPC and player. The execution of the action is based on the actions associated with the NPC's data for the given trigger.

  • Constructor Details

    • ExecuteRandomActionAction

      public ExecuteRandomActionAction()
  • Method Details

    • execute

      public void execute(@NotNull @NotNull ActionExecutionContext context, String value)
      Executes a random action triggered by the given action trigger on the specified NPC and player.
      Specified by:
      execute in class NpcAction
      Parameters:
      context - The context in which the action is being executed.
      value - The value associated with the action. Can be null if no value is required.