Class DialogueFactory

java.lang.Object
com.pixelmonmod.pixelmon.api.dialogue.DialogueFactory

public class DialogueFactory extends Object
Factory class for showing the DialogueInput GUI to a player.
This class is used to create a DialogueFactory.Builder instance to then open a DialogueInput GUI for the specified player.
  • Method Details

    • onDialogueInputSubmit

      public static void onDialogueInputSubmit(DialogueInputEvent.Submitted event)
    • onDialogueInputSubmitLast

      public static void onDialogueInputSubmitLast(DialogueInputEvent.Submitted event)
    • onDialogueInputClose

      public static void onDialogueInputClose(DialogueInputEvent.ClosedScreen event)
    • 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

      public static DialogueFactory.Builder builder()
      Creates a new DialogueFactory.Builder instance.
      Returns:
      A new DialogueFactory.Builder instance.
    • builder

      public static DialogueFactory.Builder builder(net.minecraft.network.chat.Component title)
      Creates a new DialogueFactory.Builder instance with the specified title.
      Parameters:
      title - The title of the GUI.
      Returns:
      A new DialogueFactory.Builder instance.