Class Dialogue
java.lang.Object
com.pixelmonmod.pixelmon.api.dialogue.Dialogue
Deprecated, for removal: This API element is subject to removal in a future version.
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 ClassesModifier and TypeClassDescriptionstatic classDeprecated, for removal: This API element is subject to removal in a future version. -
Field Summary
FieldsModifier and TypeFieldDescriptionDeprecated, for removal: This API element is subject to removal in a future version.Optional list of choices to be displayed underneath the dialogue.final StringDeprecated, 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
ConstructorsConstructorDescriptionDialogue(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.RegistryFriendlyByteBuf buffer) Deprecated.Dialogue(net.minecraft.network.RegistryFriendlyByteBuf buffer, boolean localized) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionstatic Dialogue.DialogueBuilderbuilder()Deprecated, for removal: This API element is subject to removal in a future version.booleanDeprecated, for removal: This API element is subject to removal in a future version.getText()Deprecated, for removal: This API element is subject to removal in a future version.voidopen(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 voidsetPlayerDialogueData(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.voidwriteToBytes(net.minecraft.network.RegistryFriendlyByteBuf buffer) Deprecated.
-
Field Details
-
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
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. -
Dialogue
@Deprecated public Dialogue(net.minecraft.network.RegistryFriendlyByteBuf 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. -
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 ofDialogues that will be shown to the player sequentially.openGui- - Whether or not the Dialogue GUI should be opened upon receiving the data.
-
builder
Deprecated, for removal: This API element is subject to removal in a future version.
-
DialogueFactoryinstead.