public static class Dialogue.DialogueBuilder
extends java.lang.Object
Dialogue
objects. Contains four building methods:
setText
,
setLocalizedText
,
setName
,
setChoices
or its more chain-friendly version,
addChoice
Choice.ChoiceBuilder
, such that the eventual
implementation may have many layers of nesting builders. Constructor and Description |
---|
DialogueBuilder() |
Modifier and Type | Method and Description |
---|---|
Dialogue.DialogueBuilder |
addChoice(Choice choice) |
Dialogue |
build() |
Dialogue.DialogueBuilder |
escapeCloses() |
Dialogue.DialogueBuilder |
injectHandler(java.util.function.Consumer<DialogueChoiceEvent> handle) |
void |
open(net.minecraft.entity.player.ServerPlayerEntity... players)
Opens it for the specified players.
|
Dialogue.DialogueBuilder |
requireManualClose() |
Dialogue.DialogueBuilder |
setChoices(java.util.ArrayList<Choice> choices) |
Dialogue.DialogueBuilder |
setLocalizedText(java.lang.String localizedText)
Deprecated.
|
Dialogue.DialogueBuilder |
setName(java.lang.String name) |
Dialogue.DialogueBuilder |
setText(java.lang.String text) |
public Dialogue build()
public Dialogue.DialogueBuilder setName(java.lang.String name)
public Dialogue.DialogueBuilder setText(java.lang.String text)
@Deprecated public Dialogue.DialogueBuilder setLocalizedText(java.lang.String localizedText)
public Dialogue.DialogueBuilder addChoice(Choice choice)
public Dialogue.DialogueBuilder setChoices(java.util.ArrayList<Choice> choices)
public Dialogue.DialogueBuilder injectHandler(java.util.function.Consumer<DialogueChoiceEvent> handle)
public Dialogue.DialogueBuilder escapeCloses()
public Dialogue.DialogueBuilder requireManualClose()
public void open(net.minecraft.entity.player.ServerPlayerEntity... players)