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
Nested ClassesModifier and TypeClassDescriptionstatic enumRepresents where is located the main hand of the player (can be changed in Minecraft option).static enum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ClientSettingsstatic final NetworkBuffer.Type<ClientSettings> -
Constructor Summary
ConstructorsConstructorDescriptionClientSettings(Locale locale, byte viewDistance, ChatMessageType chatMessageType, boolean chatColors, byte displayedSkinParts, ClientSettings.MainHand mainHand, boolean enableTextFiltering, boolean allowServerListings, ClientSettings.ParticleSetting particleSetting) Creates an instance of aClientSettingsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theallowServerListingsrecord component.booleanReturns the value of thechatColorsrecord component.Returns the value of thechatMessageTyperecord component.byteReturns the value of thedisplayedSkinPartsrecord component.intDeprecated.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.locale()Returns the value of thelocalerecord component.mainHand()Returns the value of themainHandrecord component.Returns the value of theparticleSettingrecord component.final StringtoString()Returns a string representation of this record class.byteReturns the value of theviewDistancerecord 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, ClientSettings.ParticleSetting particleSetting) Creates an instance of aClientSettingsrecord 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 componentallowServerListings- the value for theallowServerListingsrecord componentparticleSetting- the value for theparticleSettingrecord component
-
-
Method Details
-
effectiveViewDistance
Deprecated.Deprecated in favor ofPlayer.effectiveViewDistance()- Returns:
- The effective view distance, which is the smaller of either the client's view distance settings and the server's max view distance
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
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
-
allowServerListings
public boolean allowServerListings()Returns the value of theallowServerListingsrecord component.- Returns:
- the value of the
allowServerListingsrecord component
-
particleSetting
Returns the value of theparticleSettingrecord component.- Returns:
- the value of the
particleSettingrecord component
-