Record Class WrittenBookContent
java.lang.Object
java.lang.Record
net.minestom.server.item.component.WrittenBookContent
public record WrittenBookContent(@NotNull FilteredText<String> title, @NotNull String author, int generation, @NotNull List<FilteredText<Component>> pages, boolean resolved)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final WrittenBookContentstatic final @NotNull BinaryTagSerializer<WrittenBookContent> static final NetworkBuffer.Type<WrittenBookContent> -
Constructor Summary
ConstructorsConstructorDescriptionWrittenBookContent(@NotNull String title, @NotNull String author, int generation, @NotNull List<Component> pages, boolean resolved) WrittenBookContent(@NotNull String title, @NotNull String author, @NotNull List<Component> pages) WrittenBookContent(@NotNull FilteredText<String> title, @NotNull String author, int generation, @NotNull List<FilteredText<Component>> pages, boolean resolved) Creates an instance of aWrittenBookContentrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull Stringauthor()Returns the value of theauthorrecord component.final booleanIndicates whether some other object is "equal to" this one.intReturns the value of thegenerationrecord component.final inthashCode()Returns a hash code value for this object.@NotNull List<FilteredText<Component>> pages()Returns the value of thepagesrecord component.booleanresolved()Returns the value of theresolvedrecord component.@NotNull FilteredText<String> title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
EMPTY
-
NETWORK_TYPE
-
NBT_TYPE
-
-
Constructor Details
-
WrittenBookContent
public WrittenBookContent(@NotNull @NotNull FilteredText<String> title, @NotNull @NotNull String author, int generation, @NotNull @NotNull List<FilteredText<Component>> pages, boolean resolved) Creates an instance of aWrittenBookContentrecord class.- Parameters:
title- the value for thetitlerecord componentauthor- the value for theauthorrecord componentgeneration- the value for thegenerationrecord componentpages- the value for thepagesrecord componentresolved- the value for theresolvedrecord component
-
WrittenBookContent
-
WrittenBookContent
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
author
Returns the value of theauthorrecord component.- Returns:
- the value of the
authorrecord component
-
generation
public int generation()Returns the value of thegenerationrecord component.- Returns:
- the value of the
generationrecord component
-
pages
Returns the value of thepagesrecord component.- Returns:
- the value of the
pagesrecord component
-
resolved
public boolean resolved()Returns the value of theresolvedrecord component.- Returns:
- the value of the
resolvedrecord component
-