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 aComponent
com.github.retrooper.packetevents.protocol.dialog.body.DialogBody
com.github.retrooper.packetevents.protocol.dialog.body.PlainMessage
text
(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, wait
Methods inherited from interface io.github.projectunified.unidialog.adventure.support.AdventureSupport
deserialize
Methods inherited from interface io.github.projectunified.unidialog.adventure.body.AdventureTextBody
text
-
Constructor Details
-
PETextBody
-
-
Method Details
-
getComponentDeserializer
Description copied from interface:AdventureSupport
Get the deserializer function that converts a string to aComponent
- Specified by:
getComponentDeserializer
in interfaceAdventureSupport
- Returns:
- the function that deserializes a string into a Component
-
text
Description copied from interface:AdventureTextBody
Set the text for the body- Specified by:
text
in interfaceAdventureTextBody<PETextBody>
- Parameters:
text
- the text to set- Returns:
- the instance of the text body for method chaining
-
width
Description copied from interface:TextBody
Set the width of the text body- Specified by:
width
in 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:
getDialogBody
in interfacePEDialogBody
-