Class DialogueFactory
java.lang.Object
com.pixelmonmod.pixelmon.api.dialogue.DialogueFactory
Factory class for showing the DialogueInput GUI to a player.
This class is used to create a
This class is used to create a
DialogueFactory.Builder instance
to then open a DialogueInput GUI for the specified player.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA Builder for creating a DialogueInput GUI.static final recordA record storing the data for the DialogueInput GUI. -
Method Summary
Modifier and TypeMethodDescriptionstatic DialogueFactory.Builderbuilder()Creates a newDialogueFactory.Builderinstance.static DialogueFactory.Builderbuilder(net.minecraft.network.chat.Component title) Creates a newDialogueFactory.Builderinstance with the specified title.getOpenDialogue(net.minecraft.server.level.ServerPlayer player) static voidstatic voidstatic voidstatic voidonPlayerQuit(net.neoforged.neoforge.event.entity.player.PlayerEvent.PlayerLoggedOutEvent event) static voidopenDialogueInput(net.minecraft.server.level.ServerPlayer player, net.minecraft.network.chat.Component title, net.minecraft.network.chat.Component description) Sends a DialogueInput GUI to the specified player with the given title and description.static voidupdateDialogue(net.minecraft.server.level.ServerPlayer player, InputSettings settings)
-
Method Details
-
onDialogueInputSubmit
-
onDialogueInputSubmitLast
-
onDialogueInputClose
-
onPlayerQuit
public static void onPlayerQuit(net.neoforged.neoforge.event.entity.player.PlayerEvent.PlayerLoggedOutEvent event) -
getOpenDialogue
@Internal public static DialogueFactory.InputPlayerData getOpenDialogue(net.minecraft.server.level.ServerPlayer player) -
updateDialogue
@Internal public static void updateDialogue(net.minecraft.server.level.ServerPlayer player, InputSettings settings) -
openDialogueInput
public static void openDialogueInput(net.minecraft.server.level.ServerPlayer player, net.minecraft.network.chat.Component title, net.minecraft.network.chat.Component description) Sends a DialogueInput GUI to the specified player with the given title and description.
All other fields will be set to their default values.- Parameters:
player- The player to send the GUI to.title- The title of the GUI.description- The description of the GUI.
-
builder
Creates a newDialogueFactory.Builderinstance.- Returns:
- A new
DialogueFactory.Builderinstance.
-
builder
Creates a newDialogueFactory.Builderinstance with the specified title.- Parameters:
title- The title of the GUI.- Returns:
- A new
DialogueFactory.Builderinstance.
-