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.
  • 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

      public List<net.minecraft.network.chat.Component> getOptions()
      Get all the response options.
      Returns:
      the response option.
    • getOptionResult

      @Nullable public @Nullable IQuestDialogueAnswer getOptionResult(int responseId)
      Get the matching answer result.
      Parameters:
      responseId - the triggered response to match.
      Returns:
      the next answer.