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
Modifier and TypeClassDescriptionstatic class
A Builder for creating a DialogueInput GUI.static final record
A record storing the data for the DialogueInput GUI. -
Method Summary
Modifier and TypeMethodDescriptionstatic DialogueFactory.Builder
builder()
Creates a newDialogueFactory.Builder
instance.static DialogueFactory.Builder
builder
(net.minecraft.network.chat.Component title) Creates a newDialogueFactory.Builder
instance with the specified title.getOpenDialogue
(net.minecraft.server.level.ServerPlayer player) static void
static void
static void
static void
onPlayerQuit
(net.minecraftforge.event.entity.player.PlayerEvent.PlayerLoggedOutEvent event) 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.
-
Method Details
-
onDialogueInputSubmit
-
onDialogueInputSubmitLast
-
onDialogueInputClose
-
onPlayerQuit
public static void onPlayerQuit(net.minecraftforge.event.entity.player.PlayerEvent.PlayerLoggedOutEvent event) -
getOpenDialogue
@Internal public static DialogueFactory.InputPlayerData getOpenDialogue(net.minecraft.server.level.ServerPlayer player) -
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.Builder
instance.- Returns:
- A new
DialogueFactory.Builder
instance.
-
builder
Creates a newDialogueFactory.Builder
instance with the specified title.- Parameters:
title
- The title of the GUI.- Returns:
- A new
DialogueFactory.Builder
instance.
-