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 Dialogue
s 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
Modifier and TypeClassDescriptionstatic class
Deprecated, for removal: This API element is subject to removal in a future version. -
Field Summary
Modifier 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 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
ConstructorDescriptionDialogue
(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 TypeMethodDescriptionstatic Dialogue.DialogueBuilder
builder()
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.getText()
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.
-
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
-
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 ofDialogue
s 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.
-
DialogueFactory
instead.