Class DialogueChoiceEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.pixelmon.api.dialogue.event.DialogueChoiceEvent
@Deprecated(forRemoval=true,
since="9.2.7")
public class DialogueChoiceEvent
extends net.minecraftforge.eventbus.api.Event
Deprecated, for removal: This API element is subject to removal in a future version.
Event fired when there was a GUI choice and the server is expected to
provide the next action. If
DialogueNextActionPacket.DialogueGuiAction.NEW_DIALOGUES
or
DialogueNextActionPacket.DialogueGuiAction.INSERT_DIALOGUES
is returned then there is an
assumption that {@link this#newDialogues 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 DialogueNextActionPacket.DialogueGuiAction.CLOSE
.
If dialogue choices were provided with handles during building, explicitly handling this event is unnecessary as the handles will execute automatically.
- Since:
- November 20, 2017
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Field Summary
Modifier and TypeFieldDescriptionfinal Choice
Deprecated, for removal: This API element is subject to removal in a future version.The choice that was selected.final net.minecraft.server.level.ServerPlayer
Deprecated, for removal: This API element is subject to removal in a future version.The player who made the dialogue choice. -
Constructor Summary
ConstructorDescriptionDialogueChoiceEvent
(net.minecraft.server.level.ServerPlayer player, Choice choice) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionaddDialogue
(Dialogue newDialogue) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.void
Deprecated, for removal: This API element is subject to removal in a future version.Simple shortcut to send dialogues back to the player.void
Deprecated, for removal: This API element is subject to removal in a future version.Simple shortcut to send dialogues back to the player.void
Deprecated, for removal: This API element is subject to removal in a future version.Simple shortcut to send dialogues back to the player.void
Deprecated, for removal: This API element is subject to removal in a future version.void
setNewDialogues
(ArrayList<Dialogue> newDialogues) Deprecated, for removal: This API element is subject to removal in a future version.Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Field Details
-
player
public final net.minecraft.server.level.ServerPlayer playerDeprecated, for removal: This API element is subject to removal in a future version.The player who made the dialogue choice. -
choice
Deprecated, for removal: This API element is subject to removal in a future version.The choice that was selected. This can be identified using itschoiceID
, NOT by object comparison.
-
-
Constructor Details
-
DialogueChoiceEvent
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
getAction
Deprecated, for removal: This API element is subject to removal in a future version. -
setAction
Deprecated, for removal: This API element is subject to removal in a future version. -
addDialogue
Deprecated, for removal: This API element is subject to removal in a future version. -
setNewDialogues
Deprecated, for removal: This API element is subject to removal in a future version. -
getNewDialogues
Deprecated, for removal: This API element is subject to removal in a future version. -
reply
Deprecated, for removal: This API element is subject to removal in a future version.Simple shortcut to send dialogues back to the player. This will replace all previously planned dialogue. To insert dialogue instead, use the overload {@link this#reply(boolean, Dialogue...) reply(boolean, Dialogue...)}. -
reply
Deprecated, for removal: This API element is subject to removal in a future version.Simple shortcut to send dialogues back to the player.- Parameters:
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.
-
reply
Deprecated, for removal: This API element is subject to removal in a future version.Simple shortcut to send dialogues back to the player.
-
DialogueFactory
instead.