Package net.minestom.server.entity
Class Player.PlayerSettings
java.lang.Object
net.minestom.server.entity.Player.PlayerSettings
- Enclosing class:
Player
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
@Nullable ChatMessageType
Gets the messages this player wants to receive.byte
int
The player game language.Gets the player main hand.byte
Gets the player view distance.boolean
Gets if the player has chat colors enabled.void
refresh
(String locale, byte viewDistance, ChatMessageType chatMessageType, boolean chatColors, byte displayedSkinParts, Player.MainHand mainHand, boolean enableTextFiltering, boolean allowServerListings) Changes the player settings internally.
-
Constructor Details
-
PlayerSettings
public PlayerSettings()
-
-
Method Details
-
getLocale
The player game language.- Returns:
- the player locale
-
getViewDistance
public byte getViewDistance()Gets the player view distance.- Returns:
- the player view distance
-
getEffectiveViewDistance
public int getEffectiveViewDistance() -
getChatMessageType
Gets the messages this player wants to receive.- Returns:
- the messages
-
hasChatColors
public boolean hasChatColors()Gets if the player has chat colors enabled.- Returns:
- true if chat colors are enabled, false otherwise
-
getDisplayedSkinParts
public byte getDisplayedSkinParts() -
getMainHand
Gets the player main hand.- Returns:
- the player main hand
-
enableTextFiltering
public boolean enableTextFiltering() -
allowServerListings
public boolean allowServerListings() -
refresh
public void refresh(String locale, byte viewDistance, ChatMessageType chatMessageType, boolean chatColors, byte displayedSkinParts, Player.MainHand mainHand, boolean enableTextFiltering, boolean allowServerListings) Changes the player settings internally.WARNING: the player will not be noticed by this change, probably unsafe.
- Parameters:
locale
- the player localeviewDistance
- the player view distancechatMessageType
- the chat messages the player wishes to receivechatColors
- if chat colors should be displayeddisplayedSkinParts
- the player displayed skin partsmainHand
- the player main hand
-