Record Class WrittenBookContent
java.lang.Object
java.lang.Record
net.minestom.server.item.component.WrittenBookContent
public record WrittenBookContent(@NotNull List<FilteredText<Component>> pages, @NotNull FilteredText<String> title, @NotNull String author, int generation, boolean resolved)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final WrittenBookContent
static final @NotNull BinaryTagSerializer
<WrittenBookContent> static final NetworkBuffer.Type
<WrittenBookContent> -
Constructor Summary
ConstructorsConstructorDescriptionWrittenBookContent
(@NotNull List<Component> pages, @NotNull String title, @NotNull String author) WrittenBookContent
(@NotNull List<Component> pages, @NotNull String title, @NotNull String author, int generation, boolean resolved) WrittenBookContent
(@NotNull List<FilteredText<Component>> pages, @NotNull FilteredText<String> title, @NotNull String author, int generation, boolean resolved) Creates an instance of aWrittenBookContent
record class. -
Method Summary
Modifier and TypeMethodDescription@NotNull String
author()
Returns the value of theauthor
record component.final boolean
Indicates whether some other object is "equal to" this one.int
Returns the value of thegeneration
record component.final int
hashCode()
Returns a hash code value for this object.@NotNull List
<FilteredText<Component>> pages()
Returns the value of thepages
record component.boolean
resolved()
Returns the value of theresolved
record component.@NotNull FilteredText
<String> title()
Returns the value of thetitle
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
EMPTY
-
NETWORK_TYPE
-
NBT_TYPE
-
-
Constructor Details
-
WrittenBookContent
public WrittenBookContent(@NotNull @NotNull List<FilteredText<Component>> pages, @NotNull @NotNull FilteredText<String> title, @NotNull @NotNull String author, int generation, boolean resolved) Creates an instance of aWrittenBookContent
record class.- Parameters:
pages
- the value for thepages
record componenttitle
- the value for thetitle
record componentauthor
- the value for theauthor
record componentgeneration
- the value for thegeneration
record componentresolved
- the value for theresolved
record 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 '=='. -
pages
Returns the value of thepages
record component.- Returns:
- the value of the
pages
record component
-
title
Returns the value of thetitle
record component.- Returns:
- the value of the
title
record component
-
author
Returns the value of theauthor
record component.- Returns:
- the value of the
author
record component
-
generation
public int generation()Returns the value of thegeneration
record component.- Returns:
- the value of the
generation
record component
-
resolved
public boolean resolved()Returns the value of theresolved
record component.- Returns:
- the value of the
resolved
record component
-