Class PEDialogBodyBuilder

java.lang.Object
io.github.projectunified.unidialog.packetevents.body.PEDialogBodyBuilder
All Implemented Interfaces:
DialogBodyBuilder<com.github.retrooper.packetevents.protocol.item.ItemStack>, PEDialogBody

public class PEDialogBodyBuilder extends Object implements DialogBodyBuilder<com.github.retrooper.packetevents.protocol.item.ItemStack>, PEDialogBody
A PacketEvents-based implementation of DialogBodyBuilder for building dialog bodies.
  • Constructor Details

    • PEDialogBodyBuilder

      public PEDialogBodyBuilder(Function<String,net.kyori.adventure.text.Component> componentDeserializer)
      Constructor for PEDialogBodyBuilder
      Parameters:
      componentDeserializer - a function to deserialize components from strings
  • Method Details

    • item

      public PEItemBody item()
      Description copied from interface: DialogBodyBuilder
      Create an item body
      Specified by:
      item in interface DialogBodyBuilder<com.github.retrooper.packetevents.protocol.item.ItemStack>
      Returns:
      the instance of the item body
    • text

      public PETextBody text()
      Description copied from interface: DialogBodyBuilder
      Create a text body
      Specified by:
      text in interface DialogBodyBuilder<com.github.retrooper.packetevents.protocol.item.ItemStack>
      Returns:
      the instance of the text body
    • getDialogBody

      public com.github.retrooper.packetevents.protocol.dialog.body.DialogBody getDialogBody()
      Description copied from interface: PEDialogBody
      Get the PacketEvents dialog body
      Specified by:
      getDialogBody in interface PEDialogBody
      Returns:
      the dialog body