Record Class ClientSettingsPacket
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.client.common.ClientSettingsPacket
- All Implemented Interfaces:
NetworkBuffer.Writer
,ClientPacket
public record ClientSettingsPacket(@NotNull String locale, byte viewDistance, @NotNull ChatMessageType chatMessageType, boolean chatColors, byte displayedSkinParts, Player.MainHand mainHand, boolean enableTextFiltering, boolean allowsListing)
extends Record
implements ClientPacket
-
Constructor Summary
ConstructorDescriptionClientSettingsPacket
(@NotNull String locale, byte viewDistance, @NotNull ChatMessageType chatMessageType, boolean chatColors, byte displayedSkinParts, Player.MainHand mainHand, boolean enableTextFiltering, boolean allowsListing) Creates an instance of aClientSettingsPacket
record class.ClientSettingsPacket
(@NotNull NetworkBuffer reader) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the value of theallowsListing
record component.boolean
Returns the value of thechatColors
record component.@NotNull ChatMessageType
Returns the value of thechatMessageType
record component.byte
Returns the value of thedisplayedSkinParts
record component.boolean
Returns the value of theenableTextFiltering
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.@NotNull String
locale()
Returns the value of thelocale
record component.mainHand()
Returns the value of themainHand
record component.final String
toString()
Returns a string representation of this record class.byte
Returns the value of theviewDistance
record component.void
write
(@NotNull NetworkBuffer writer) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minestom.server.network.packet.client.ClientPacket
processImmediately
-
Constructor Details
-
ClientSettingsPacket
public ClientSettingsPacket(@NotNull @NotNull String locale, byte viewDistance, @NotNull @NotNull ChatMessageType chatMessageType, boolean chatColors, byte displayedSkinParts, @NotNull Player.MainHand mainHand, boolean enableTextFiltering, boolean allowsListing) Creates an instance of aClientSettingsPacket
record class.- Parameters:
locale
- the value for thelocale
record componentviewDistance
- the value for theviewDistance
record componentchatMessageType
- the value for thechatMessageType
record componentchatColors
- the value for thechatColors
record componentdisplayedSkinParts
- the value for thedisplayedSkinParts
record componentmainHand
- the value for themainHand
record componentenableTextFiltering
- the value for theenableTextFiltering
record componentallowsListing
- the value for theallowsListing
record component
-
ClientSettingsPacket
-
-
Method Details
-
write
- Specified by:
write
in interfaceNetworkBuffer.Writer
-
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 '=='. -
locale
Returns the value of thelocale
record component.- Returns:
- the value of the
locale
record component
-
viewDistance
public byte viewDistance()Returns the value of theviewDistance
record component.- Returns:
- the value of the
viewDistance
record component
-
chatMessageType
Returns the value of thechatMessageType
record component.- Returns:
- the value of the
chatMessageType
record component
-
chatColors
public boolean chatColors()Returns the value of thechatColors
record component.- Returns:
- the value of the
chatColors
record component
-
displayedSkinParts
public byte displayedSkinParts()Returns the value of thedisplayedSkinParts
record component.- Returns:
- the value of the
displayedSkinParts
record component
-
mainHand
Returns the value of themainHand
record component.- Returns:
- the value of the
mainHand
record component
-
enableTextFiltering
public boolean enableTextFiltering()Returns the value of theenableTextFiltering
record component.- Returns:
- the value of the
enableTextFiltering
record component
-
allowsListing
public boolean allowsListing()Returns the value of theallowsListing
record component.- Returns:
- the value of the
allowsListing
record component
-