Package com.minecolonies.api.quests
Class IDialogueObjectiveTemplate.DialogueElement
java.lang.Object
com.minecolonies.api.quests.IDialogueObjectiveTemplate.DialogueElement
- All Implemented Interfaces:
IQuestDialogueAnswer
- Enclosing interface:
IDialogueObjectiveTemplate
public static class IDialogueObjectiveTemplate.DialogueElement
extends Object
implements IQuestDialogueAnswer
A dialogue element in the dialogue objective.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.minecolonies.api.quests.IQuestDialogueAnswer
IQuestDialogueAnswer.CloseUIDialogueAnswer, IQuestDialogueAnswer.NextObjectiveDialogueAnswer, IQuestDialogueAnswer.QuestCancellationDialogueAnswer -
Constructor Summary
ConstructorsConstructorDescriptionDialogueElement(net.minecraft.network.chat.Component text, List<IDialogueObjectiveTemplate.AnswerElement> answers) Create a new dialogue element. -
Method Summary
Modifier and TypeMethodDescription@Nullable IQuestDialogueAnswergetOptionResult(int responseId) Get the matching answer result.List<net.minecraft.network.chat.Component> Get all the response options.net.minecraft.network.chat.ComponentgetText()Getter for the element text.parse(com.google.gson.JsonObject jsonObject) Parse the element from json.
-
Constructor Details
-
DialogueElement
public DialogueElement(net.minecraft.network.chat.Component text, List<IDialogueObjectiveTemplate.AnswerElement> answers) Create a new dialogue element.- Parameters:
text- the participant.answers- the player answers.
-
-
Method Details
-
parse
public static IDialogueObjectiveTemplate.DialogueElement parse(com.google.gson.JsonObject jsonObject) Parse the element from json.- Parameters:
jsonObject- the json to parse it from.- Returns:
- a new element.
-
getText
public net.minecraft.network.chat.Component getText()Getter for the element text.- Returns:
- the text.
-
getOptions
Get all the response options.- Returns:
- the response option.
-
getOptionResult
Get the matching answer result.- Parameters:
responseId- the triggered response to match.- Returns:
- the next answer.
-