Class Answer.Builder
java.lang.Object
org.aselstudios.luxdialoguesapi.Builders.Answer.Builder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds an action executed when this answer is selected.addCallback(DialogueCallback callback) Adds a callback invoked when this answer is selected.addCondition(String condition) Adds a condition required for this answer to be available.addReplyMessage(String message) Adds a reply chat/message sent when this answer is selected.build()Builds theAnswerinstance.setAnswerID(String answerID) Sets the unique ID of this answer.setAnswerText(String answerText) Sets the visible text of this answer.Sets the page IDs to navigate to when this answer is selected.Configures the sound played when this answer is selected.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setAnswerID
Sets the unique ID of this answer.- Parameters:
answerID- answer identifier- Returns:
- this builder for chaining
-
setAnswerText
Sets the visible text of this answer.- Parameters:
answerText- text to display- Returns:
- this builder for chaining
-
setGoTo
Sets the page IDs to navigate to when this answer is selected.- Parameters:
goTo- list of page IDs- Returns:
- this builder for chaining
-
addReplyMessage
Adds a reply chat/message sent when this answer is selected.- Parameters:
message- reply message- Returns:
- this builder for chaining
-
setSound
public Answer.Builder setSound(String sound, String soundSource, Double soundVolume, Double soundPitch) Configures the sound played when this answer is selected.- Parameters:
sound- sound namesoundSource- sound sourcesoundVolume- volume (0.0–1.0)soundPitch- pitch- Returns:
- this builder for chaining
-
addCondition
Adds a condition required for this answer to be available.- Parameters:
condition- condition string, implementation specific- Returns:
- this builder for chaining
-
addAction
Adds an action executed when this answer is selected.- Parameters:
action- action string, implementation specific- Returns:
- this builder for chaining
-
addCallback
Adds a callback invoked when this answer is selected.- Parameters:
callback- callback to invoke- Returns:
- this builder for chaining
-
build
-