Class Player.PlayerSettings

java.lang.Object
net.minestom.server.entity.Player.PlayerSettings
Enclosing class:
Player

public class Player.PlayerSettings extends Object
  • Constructor Details

    • PlayerSettings

      public PlayerSettings()
  • Method Details

    • getLocale

      public String 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

      @Nullable public @Nullable ChatMessageType 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

      public Player.MainHand 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 locale
      viewDistance - the player view distance
      chatMessageType - the chat messages the player wishes to receive
      chatColors - if chat colors should be displayed
      displayedSkinParts - the player displayed skin parts
      mainHand - the player main hand