Class ChargeRequirement.Builder
java.lang.Object
net.storm.api.movement.pathfinder.model.requirement.charges.ChargeRequirement.Builder
- Enclosing class:
ChargeRequirement
Builder class for constructing ChargeRequirement instances.
Provides a fluent API for configuring all aspects of charge tracking.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionanimationId(int animationId) Sets the animation ID that triggers charge detection.build()Builds the ChargeRequirement instance.chatTrigger(String regex) Adds a chat trigger pattern from a regex string.chatTriggers(List<Pattern> chatTriggers) Sets the chat trigger patterns for detecting charge messages.dailyReset(boolean dailyReset) Sets whether charges reset daily (e.g., Achievement Diary items).graphicId(int graphicId) Sets the graphic ID that triggers charge detection.itemIds(int... itemIds) Sets the item IDs that this charge tracking applies to.maxCharges(int maxCharges) Sets the maximum number of charges the item can hold.
-
Constructor Details
-
Builder
Creates a new builder with the specified ID.- Parameters:
id- unique identifier for this charge requirement
-
-
Method Details
-
itemIds
Sets the item IDs that this charge tracking applies to.- Parameters:
itemIds- array of item IDs- Returns:
- this builder for chaining
-
chatTriggers
Sets the chat trigger patterns for detecting charge 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
-
maxCharges
Sets the maximum number of charges the item can hold.- Parameters:
maxCharges- maximum charge count- Returns:
- this builder for chaining
-
dailyReset
Sets whether charges reset daily (e.g., Achievement Diary items).- Parameters:
dailyReset- true if charges reset at daily reset time- Returns:
- this builder for chaining
-
graphicId
Sets the graphic ID that triggers charge detection.- Parameters:
graphicId- the graphic/spotanim ID- Returns:
- this builder for chaining
-
animationId
Sets the animation ID that triggers charge detection.- Parameters:
animationId- the animation ID- Returns:
- this builder for chaining
-
build
Builds the ChargeRequirement instance.- Returns:
- the configured ChargeRequirement
-