Record Class ClientSettings
java.lang.Object
java.lang.Record
net.minestom.server.network.player.ClientSettings
public record ClientSettings(Locale locale, byte viewDistance, ChatMessageType chatMessageType, boolean chatColors, byte displayedSkinParts, ClientSettings.MainHand mainHand, boolean enableTextFiltering, boolean allowServerListings, ClientSettings.ParticleSetting particleSetting)
extends Record
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Represents where is located the main hand of the player (can be changed in Minecraft option).static enum
-
Field Summary
Modifier and TypeFieldDescriptionstatic ClientSettings
static final NetworkBuffer.Type
<ClientSettings> -
Constructor Summary
ConstructorDescriptionClientSettings
(Locale locale, byte viewDistance, ChatMessageType chatMessageType, boolean chatColors, byte displayedSkinParts, ClientSettings.MainHand mainHand, boolean enableTextFiltering, boolean allowServerListings, ClientSettings.ParticleSetting particleSetting) Creates an instance of aClientSettings
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the value of theallowServerListings
record component.boolean
Returns the value of thechatColors
record component.Returns the value of thechatMessageType
record component.byte
Returns the value of thedisplayedSkinParts
record component.int
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.locale()
Returns the value of thelocale
record component.mainHand()
Returns the value of themainHand
record component.Returns the value of theparticleSetting
record component.final String
toString()
Returns a string representation of this record class.byte
Returns the value of theviewDistance
record component.
-
Field Details
-
DEFAULT
-
NETWORK_TYPE
-
-
Constructor Details
-
ClientSettings
public ClientSettings(Locale locale, byte viewDistance, ChatMessageType chatMessageType, boolean chatColors, byte displayedSkinParts, ClientSettings.MainHand mainHand, boolean enableTextFiltering, boolean allowServerListings, @NotNull ClientSettings.ParticleSetting particleSetting) Creates an instance of aClientSettings
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 componentallowServerListings
- the value for theallowServerListings
record componentparticleSetting
- the value for theparticleSetting
record component
-
-
Method Details
-
effectiveViewDistance
public int effectiveViewDistance() -
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
-
allowServerListings
public boolean allowServerListings()Returns the value of theallowServerListings
record component.- Returns:
- the value of the
allowServerListings
record component
-
particleSetting
Returns the value of theparticleSetting
record component.- Returns:
- the value of the
particleSetting
record component
-