java.lang.Object
io.github.projectunified.unidialog.packetevents.body.PETextBody
All Implemented Interfaces:
AdventureTextBody<PETextBody>, AdventureSupport, TextBody<PETextBody>, PEDialogBody

public class PETextBody extends Object implements AdventureTextBody<PETextBody>, PEDialogBody
  • Constructor Details

    • PETextBody

      public PETextBody(Function<String,net.kyori.adventure.text.Component> componentDeserializer)
  • Method Details

    • getComponentDeserializer

      public Function<String,net.kyori.adventure.text.Component> getComponentDeserializer()
      Description copied from interface: AdventureSupport
      Get the deserializer function that converts a string to a Component
      Specified by:
      getComponentDeserializer in interface AdventureSupport
      Returns:
      the function that deserializes a string into a Component
    • text

      public PETextBody text(net.kyori.adventure.text.Component text)
      Description copied from interface: AdventureTextBody
      Set the text for the body
      Specified by:
      text in interface AdventureTextBody<PETextBody>
      Parameters:
      text - the text to set
      Returns:
      the instance of the text body for method chaining
    • width

      public PETextBody width(int width)
      Description copied from interface: TextBody
      Set the width of the text body
      Specified by:
      width in interface TextBody<PETextBody>
      Parameters:
      width - the width to set
      Returns:
      the instance of the text body for method chaining
    • getPlainMessage

      public com.github.retrooper.packetevents.protocol.dialog.body.PlainMessage getPlainMessage()
    • getDialogBody

      public com.github.retrooper.packetevents.protocol.dialog.body.DialogBody getDialogBody()
      Specified by:
      getDialogBody in interface PEDialogBody