public class Dialogue
extends java.lang.Object
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(EntityPlayerMP, List, boolean)
.
Created by Hiroku
Modifier and Type | Class and Description |
---|---|
static class |
Dialogue.DialogueBuilder
Builder for
Dialogue objects. |
Modifier and Type | Field and Description |
---|---|
java.util.ArrayList<Choice> |
choices
Optional list of choices to be displayed underneath the dialogue.
|
java.lang.String |
name
The name to display at the top of the dialogue box.
|
QuestProgressClient |
quest |
Constructor and Description |
---|
Dialogue(io.netty.buffer.ByteBuf buffer)
Deprecated.
|
Dialogue(io.netty.buffer.ByteBuf buffer,
boolean localized)
Deprecated.
|
Dialogue(io.netty.buffer.ByteBuf buffer,
java.util.UUID quest) |
Dialogue(java.lang.String name,
java.lang.String text,
java.lang.String localizedText,
java.util.ArrayList<Choice> choices) |
Modifier and Type | Method and Description |
---|---|
static Dialogue.DialogueBuilder |
builder() |
java.lang.String |
getText() |
void |
open(net.minecraft.entity.player.EntityPlayerMP... players)
Opens this dialogue on the players' screens.
|
void |
open(java.util.UUID quest,
net.minecraft.entity.player.EntityPlayerMP... players) |
static void |
setPlayerDialogueData(net.minecraft.entity.player.EntityPlayerMP player,
java.util.List<Dialogue> dialogues,
boolean openGui)
Server-oriented method to send new dialogue data to a player, and optionally order the GUI to open.
|
static void |
setPlayerDialogueData(java.util.UUID quest,
net.minecraft.entity.player.EntityPlayerMP player,
java.util.List<Dialogue> dialogues,
boolean openGui) |
void |
writeToBytes(io.netty.buffer.ByteBuf buffer)
Deprecated.
|
public final java.lang.String name
public final java.util.ArrayList<Choice> choices
public QuestProgressClient quest
@Deprecated public Dialogue(io.netty.buffer.ByteBuf buffer)
@Deprecated public Dialogue(io.netty.buffer.ByteBuf buffer, boolean localized)
public Dialogue(io.netty.buffer.ByteBuf buffer, java.util.UUID quest)
public Dialogue(java.lang.String name, java.lang.String text, java.lang.String localizedText, java.util.ArrayList<Choice> choices)
@Deprecated public void writeToBytes(io.netty.buffer.ByteBuf buffer)
public java.lang.String getText()
public void open(net.minecraft.entity.player.EntityPlayerMP... players)
public void open(java.util.UUID quest, net.minecraft.entity.player.EntityPlayerMP... players)
public static void setPlayerDialogueData(net.minecraft.entity.player.EntityPlayerMP player, java.util.List<Dialogue> dialogues, boolean openGui)
player
- - The player to send it to.dialogues
- - The list of Dialogue
s that will be shown to the player sequentially.openGui
- - Whether or not the Dialogue GUI should be opened upon receiving the data.public static void setPlayerDialogueData(java.util.UUID quest, net.minecraft.entity.player.EntityPlayerMP player, java.util.List<Dialogue> dialogues, boolean openGui)
public static Dialogue.DialogueBuilder builder()