Class PETextBody
java.lang.Object
io.github.projectunified.unidialog.packetevents.body.PETextBody
- All Implemented Interfaces:
AdventureTextBody<PETextBody>,AdventureSupport,TextBody<PETextBody>,PEDialogBody
-
Field Summary
Fields inherited from interface io.github.projectunified.unidialog.core.body.TextBody
DEFAULT_WIDTH -
Constructor Summary
ConstructorsConstructorDescriptionPETextBody(Function<String, net.kyori.adventure.text.Component> componentDeserializer) -
Method Summary
Modifier and TypeMethodDescriptionGet the deserializer function that converts a string to aComponentcom.github.retrooper.packetevents.protocol.dialog.body.DialogBodycom.github.retrooper.packetevents.protocol.dialog.body.PlainMessagetext(net.kyori.adventure.text.Component text) Set the text for the bodywidth(int width) Set the width of the text bodyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.github.projectunified.unidialog.adventure.support.AdventureSupport
deserializeMethods inherited from interface io.github.projectunified.unidialog.adventure.body.AdventureTextBody
text
-
Constructor Details
-
PETextBody
-
-
Method Details
-
getComponentDeserializer
Description copied from interface:AdventureSupportGet the deserializer function that converts a string to aComponent- Specified by:
getComponentDeserializerin interfaceAdventureSupport- Returns:
- the function that deserializes a string into a Component
-
text
Description copied from interface:AdventureTextBodySet the text for the body- Specified by:
textin interfaceAdventureTextBody<PETextBody>- Parameters:
text- the text to set- Returns:
- the instance of the text body for method chaining
-
width
Description copied from interface:TextBodySet the width of the text body- Specified by:
widthin interfaceTextBody<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:
getDialogBodyin interfacePEDialogBody
-