public class DialogueChoiceEvent
extends net.minecraftforge.fml.common.eventhandler.Event
DialogueNextAction.DialogueGuiAction.NEW_DIALOGUES
or
DialogueNextAction.DialogueGuiAction.INSERT_DIALOGUES
is returned then there is an
assumption that newDialogues
is both non-null and non-empty.
By default, the response will be to continue with any remaining dialogue
that has been queued on the client. If none remains, it behaves the same
as a response with DialogueNextAction.DialogueGuiAction.CLOSE
.
If dialogue choices were provided with handles during building, explicitly handling this event is unnecessary as the handles will execute automatically.
Created by Hiroku
Modifier and Type | Field and Description |
---|---|
Choice |
choice
The choice that was selected.
|
net.minecraft.entity.player.EntityPlayerMP |
player
The player who made the dialogue choice.
|
Constructor and Description |
---|
DialogueChoiceEvent(net.minecraft.entity.player.EntityPlayerMP player,
Choice choice) |
Modifier and Type | Method and Description |
---|---|
DialogueChoiceEvent |
addDialogue(Dialogue newDialogue) |
DialogueNextAction.DialogueGuiAction |
getAction() |
java.util.ArrayList<Dialogue> |
getNewDialogues() |
void |
reply(boolean insert,
Dialogue... dialogues)
Simple shortcut to send dialogues back to the player.
|
void |
reply(Dialogue... dialogues)
Simple shortcut to send dialogues back to the player.
|
void |
reply(java.lang.String name,
java.lang.String... texts)
Simple shortcut to send dialogues back to the player.
|
void |
setAction(DialogueNextAction.DialogueGuiAction action) |
void |
setNewDialogues(java.util.ArrayList<Dialogue> newDialogues) |
public final net.minecraft.entity.player.EntityPlayerMP player
public DialogueChoiceEvent(net.minecraft.entity.player.EntityPlayerMP player, Choice choice)
public DialogueNextAction.DialogueGuiAction getAction()
public void setAction(DialogueNextAction.DialogueGuiAction action)
public DialogueChoiceEvent addDialogue(Dialogue newDialogue)
public void setNewDialogues(java.util.ArrayList<Dialogue> newDialogues)
public java.util.ArrayList<Dialogue> getNewDialogues()
public void reply(Dialogue... dialogues)
reply(boolean, Dialogue...)
.public void reply(boolean insert, Dialogue... dialogues)
insert
- - Whether or not it should use insertion. If false, this will replace all previous dialogue. if
true, this will put the given dialogue at the beginning of the queue.public void reply(java.lang.String name, java.lang.String... texts)