Class Dialogue

java.lang.Object
com.pixelmonmod.pixelmon.api.dialogue.Dialogue

@Deprecated(forRemoval=true, since="9.2.7") public class Dialogue extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
Use DialogueFactory instead.
Represents a page of dialogue. This is capable of offering choices for the player to select, most easily implemented through the use of a Dialogue.DialogueBuilder. To add smooth handling of choices, the Choice.ChoiceBuilder provides a builder setter for the handler of the eventual DialogueChoiceEvent.

After constructing a list of Dialogues to show to a player, sending this data to players is best performed by setPlayerDialogueData(ServerPlayer, List, boolean).

Since:
November 20, 2017
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Deprecated, for removal: This API element is subject to removal in a future version.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    Optional list of choices to be displayed underneath the dialogue.
    final String
    Deprecated, for removal: This API element is subject to removal in a future version.
    The name to display at the top of the dialogue box.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Dialogue(String name, String text, String localizedText, boolean escapeCloses, ArrayList<Choice> choices)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Dialogue(net.minecraft.network.FriendlyByteBuf buffer)
    Deprecated.
    Dialogue(net.minecraft.network.FriendlyByteBuf buffer, boolean localized)
    Deprecated.
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    open(net.minecraft.server.level.ServerPlayer... players)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Opens this dialogue on the players' screens.
    static void
    setPlayerDialogueData(net.minecraft.server.level.ServerPlayer player, List<Dialogue> dialogues, boolean openGui)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Server-oriented method to send new dialogue data to a player, and optionally order the GUI to open.
    void
    writeToBytes(net.minecraft.network.FriendlyByteBuf buffer)
    Deprecated.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • name

      public final String name
      Deprecated, for removal: This API element is subject to removal in a future version.
      The name to display at the top of the dialogue box.
    • choices

      public final ArrayList<Choice> choices
      Deprecated, for removal: This API element is subject to removal in a future version.
      Optional list of choices to be displayed underneath the dialogue.
  • Constructor Details

    • Dialogue

      @Deprecated public Dialogue(net.minecraft.network.FriendlyByteBuf buffer)
      Deprecated.
    • Dialogue

      @Deprecated public Dialogue(net.minecraft.network.FriendlyByteBuf buffer, boolean localized)
      Deprecated.
    • Dialogue

      public Dialogue(String name, String text, String localizedText, boolean escapeCloses, ArrayList<Choice> choices)
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • writeToBytes

      @Deprecated public void writeToBytes(net.minecraft.network.FriendlyByteBuf buffer)
      Deprecated.
    • getText

      public String getText()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • open

      public void open(net.minecraft.server.level.ServerPlayer... players)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Opens this dialogue on the players' screens.
    • escapeCloses

      public boolean escapeCloses()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setPlayerDialogueData

      public static void setPlayerDialogueData(net.minecraft.server.level.ServerPlayer player, List<Dialogue> dialogues, boolean openGui)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Server-oriented method to send new dialogue data to a player, and optionally order the GUI to open.
      Parameters:
      player - - The player to send it to.
      dialogues - - The list of Dialogues that will be shown to the player sequentially.
      openGui - - Whether or not the Dialogue GUI should be opened upon receiving the data.
    • builder

      public static Dialogue.DialogueBuilder builder()
      Deprecated, for removal: This API element is subject to removal in a future version.