Class PlayerCommandAsOpAction

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

public class PlayerCommandAsOpAction extends NpcAction
PlayerCommandAsOpAction is a npc action that allows a player to execute a command as an operator when triggered by an NPC interaction.
  • Constructor Details

    • PlayerCommandAsOpAction

      public PlayerCommandAsOpAction()
  • Method Details

    • execute

      public void execute(@NotNull @NotNull ActionExecutionContext context, String value)
      Executes a player command as an operator when triggered by an NPC interaction.
      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.