Class UnlockRequirement.Builder
java.lang.Object
net.storm.api.movement.pathfinder.model.requirement.charges.UnlockRequirement.Builder
- Enclosing class:
UnlockRequirement
Builder class for constructing UnlockRequirement instances.
Provides a fluent API for configuring all aspects of unlock tracking.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the UnlockRequirement instance.chatTrigger(String regex) Adds a chat trigger pattern from a regex string.chatTriggers(List<Pattern> chatTriggers) Sets the chat trigger patterns for detecting unlock messages.itemIds(int... itemIds) Sets the item IDs that this unlock tracking applies to.lockTrigger(String regex) Adds a pattern that indicates re-locking from chat.menuActionId(int menuActionId) Sets the menu action ID associated with the unlock.objectMenuId(int objectMenuId) Sets the object menu ID for unlock interaction.unlockTrigger(String regex) Adds a pattern that indicates successful unlocking from chat.Sets the widget to check for unlock status.
-
Constructor Details
-
Builder
Creates a new builder with the specified ID.- Parameters:
id- unique identifier for this unlock requirement
-
-
Method Details
-
itemIds
Sets the item IDs that this unlock tracking applies to.- Parameters:
itemIds- array of item IDs- Returns:
- this builder for chaining
-
chatTriggers
Sets the chat trigger patterns for detecting unlock messages.- Parameters:
chatTriggers- list of compiled regex patterns- Returns:
- this builder for chaining
-
chatTrigger
Adds a chat trigger pattern from a regex string.- Parameters:
regex- the regex pattern to match chat messages- Returns:
- this builder for chaining
-
widget
Sets the widget to check for unlock status.- Parameters:
groupId- widget group IDchildId- widget child IDtextMatch- text to match in the widget- Returns:
- this builder for chaining
-
objectMenuId
Sets the object menu ID for unlock interaction.- Parameters:
objectMenuId- the object menu ID- Returns:
- this builder for chaining
-
unlockTrigger
Adds a pattern that indicates successful unlocking from chat.- Parameters:
regex- the regex pattern to match unlock messages- Returns:
- this builder for chaining
-
lockTrigger
Adds a pattern that indicates re-locking from chat.- Parameters:
regex- the regex pattern to match lock messages- Returns:
- this builder for chaining
-
build
Builds the UnlockRequirement instance.- Returns:
- the configured UnlockRequirement
-