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
ConstructorsConstructorDescriptionClientSettingsPacket(@NotNull String locale, byte viewDistance, @NotNull ChatMessageType chatMessageType, boolean chatColors, byte displayedSkinParts, Player.MainHand mainHand, boolean enableTextFiltering, boolean allowsListing) Creates an instance of aClientSettingsPacketrecord class.ClientSettingsPacket(@NotNull NetworkBuffer reader) -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theallowsListingrecord component.booleanReturns the value of thechatColorsrecord component.@NotNull ChatMessageTypeReturns the value of thechatMessageTyperecord component.byteReturns the value of thedisplayedSkinPartsrecord component.booleanReturns the value of theenableTextFilteringrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull Stringlocale()Returns the value of thelocalerecord component.mainHand()Returns the value of themainHandrecord component.final StringtoString()Returns a string representation of this record class.byteReturns the value of theviewDistancerecord component.voidwrite(@NotNull NetworkBuffer writer)
-
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 aClientSettingsPacketrecord class.- Parameters:
locale- the value for thelocalerecord componentviewDistance- the value for theviewDistancerecord componentchatMessageType- the value for thechatMessageTyperecord componentchatColors- the value for thechatColorsrecord componentdisplayedSkinParts- the value for thedisplayedSkinPartsrecord componentmainHand- the value for themainHandrecord componentenableTextFiltering- the value for theenableTextFilteringrecord componentallowsListing- the value for theallowsListingrecord component
-
ClientSettingsPacket
-
-
Method Details
-
write
- Specified by:
writein 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 thelocalerecord component.- Returns:
- the value of the
localerecord component
-
viewDistance
public byte viewDistance()Returns the value of theviewDistancerecord component.- Returns:
- the value of the
viewDistancerecord component
-
chatMessageType
Returns the value of thechatMessageTyperecord component.- Returns:
- the value of the
chatMessageTyperecord component
-
chatColors
public boolean chatColors()Returns the value of thechatColorsrecord component.- Returns:
- the value of the
chatColorsrecord component
-
displayedSkinParts
public byte displayedSkinParts()Returns the value of thedisplayedSkinPartsrecord component.- Returns:
- the value of the
displayedSkinPartsrecord component
-
mainHand
Returns the value of themainHandrecord component.- Returns:
- the value of the
mainHandrecord component
-
enableTextFiltering
public boolean enableTextFiltering()Returns the value of theenableTextFilteringrecord component.- Returns:
- the value of the
enableTextFilteringrecord component
-
allowsListing
public boolean allowsListing()Returns the value of theallowsListingrecord component.- Returns:
- the value of the
allowsListingrecord component
-