Class PaperTextBody
java.lang.Object
io.github.projectunified.unidialog.paper.body.PaperTextBody
- All Implemented Interfaces:
AdventureTextBody<PaperTextBody>
,AdventureSupport
,TextBody<PaperTextBody>
,PaperDialogBody
public class PaperTextBody
extends Object
implements AdventureTextBody<PaperTextBody>, PaperDialogBody
-
Field Summary
Fields inherited from interface io.github.projectunified.unidialog.core.body.TextBody
DEFAULT_WIDTH
-
Constructor Summary
ConstructorsConstructorDescriptionPaperTextBody
(Function<String, net.kyori.adventure.text.Component> componentDeserializer) -
Method Summary
Methods 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
-
PaperTextBody
-
-
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<PaperTextBody>
- 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<PaperTextBody>
- Parameters:
width
- the width to set- Returns:
- the instance of the text body for method chaining
-
getDialogBody
public io.papermc.paper.registry.data.dialog.body.PlainMessageDialogBody getDialogBody()- Specified by:
getDialogBody
in interfacePaperDialogBody
-