Class UnlockRequirement.Builder

java.lang.Object
net.storm.api.movement.pathfinder.model.requirement.charges.UnlockRequirement.Builder
Enclosing class:
UnlockRequirement

public static class UnlockRequirement.Builder extends Object
Builder class for constructing UnlockRequirement instances.

Provides a fluent API for configuring all aspects of unlock tracking.

  • Constructor Details

    • Builder

      public Builder(String id)
      Creates a new builder with the specified ID.
      Parameters:
      id - unique identifier for this unlock requirement
  • Method Details

    • itemIds

      public UnlockRequirement.Builder itemIds(int... itemIds)
      Sets the item IDs that this unlock tracking applies to.
      Parameters:
      itemIds - array of item IDs
      Returns:
      this builder for chaining
    • chatTriggers

      public UnlockRequirement.Builder chatTriggers(List<Pattern> chatTriggers)
      Sets the chat trigger patterns for detecting unlock messages.
      Parameters:
      chatTriggers - list of compiled regex patterns
      Returns:
      this builder for chaining
    • chatTrigger

      public UnlockRequirement.Builder chatTrigger(String regex)
      Adds a chat trigger pattern from a regex string.
      Parameters:
      regex - the regex pattern to match chat messages
      Returns:
      this builder for chaining
    • widget

      public UnlockRequirement.Builder widget(int groupId, int childId, String textMatch)
      Sets the widget to check for unlock status.
      Parameters:
      groupId - widget group ID
      childId - widget child ID
      textMatch - text to match in the widget
      Returns:
      this builder for chaining
    • objectMenuId

      public UnlockRequirement.Builder objectMenuId(int objectMenuId)
      Sets the object menu ID for unlock interaction.
      Parameters:
      objectMenuId - the object menu ID
      Returns:
      this builder for chaining
    • unlockTrigger

      public UnlockRequirement.Builder unlockTrigger(String regex)
      Adds a pattern that indicates successful unlocking from chat.
      Parameters:
      regex - the regex pattern to match unlock messages
      Returns:
      this builder for chaining
    • lockTrigger

      public UnlockRequirement.Builder lockTrigger(String regex)
      Adds a pattern that indicates re-locking from chat.
      Parameters:
      regex - the regex pattern to match lock messages
      Returns:
      this builder for chaining
    • build

      public UnlockRequirement build()
      Builds the UnlockRequirement instance.
      Returns:
      the configured UnlockRequirement