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, 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
-
PaperTextBody
-
-
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<PaperTextBody>- 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<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:
getDialogBodyin interfacePaperDialogBody
-