Class ClientSettings

java.lang.Object
net.glowstone.entity.meta.ClientSettings

public class ClientSettings extends Object
Container for settings which the client communicates to the server.
  • Field Details

  • Constructor Details

    • ClientSettings

      public ClientSettings(ClientSettingsMessage msg)
      Construct the ClientSettings from a ClientSettingsMessage.
      Parameters:
      msg - The message sent by the client.
    • ClientSettings

      public ClientSettings(String locale, int viewDistance, int chatFlags, boolean chatColors, int skinFlags, int mainHand)
      Construct a ClientSettings.
      Parameters:
      locale - The locale, in a form like "en_US".
      viewDistance - The view distance, in chunks.
      chatFlags - The client's chat flags.
      chatColors - Whether the client has chat colors enabled.
      skinFlags - The client's skin flags.
      mainHand - The main hand of the player.
  • Method Details

    • showChat

      public boolean showChat()
      Get whether player chat should be shown based on chat flags.
      Returns:
      Whether player chat is shown.
    • showCommands

      public boolean showCommands()
      Get whether command output should be shown based on chat flags.
      Returns:
      Whether command output is shown.
    • showChatColors

      public boolean showChatColors()
      Get if the client has chat colors enabled.
      Returns:
      Whether chat colors are enabled.
    • getLocale

      public String getLocale()
    • getChatFlags

      public int getChatFlags()
    • isChatColors

      public boolean isChatColors()
    • getSkinFlags

      public int getSkinFlags()
    • getMainHand

      public int getMainHand()
    • getViewDistance

      public int getViewDistance()
    • setViewDistance

      public void setViewDistance(int viewDistance)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object