Class PreferencesCache

java.lang.Object
org.geysermc.geyser.session.cache.PreferencesCache

public class PreferencesCache extends Object
  • Constructor Details

    • PreferencesCache

      public PreferencesCache(GeyserSession session)
  • Method Details

    • updateShowCoordinates

      public void updateShowCoordinates()
      Tell the client to hide or show the coordinates. If prefersShowCoordinates is true, coordinates will be shown, unless either of the following conditions apply:

      GeyserSession.reducedDebugInfo is enabled GeyserConfiguration.isShowCoordinates() is disabled
    • showCustomSkulls

      public boolean showCustomSkulls()
      Returns:
      true if the session prefers custom skulls, and the config allows them.
    • getSession

      public GeyserSession getSession()
    • isPrefersShowCoordinates

      public boolean isPrefersShowCoordinates()
      True if the client prefers being shown their coordinates, regardless if they're being shown or not. This will be true everytime the client joins the server because neither the client nor server store the preference permanently.
    • isAllowShowCoordinates

      public boolean isAllowShowCoordinates()
      If the client's preference will be ignored, this will return false.
    • isPrefersCustomSkulls

      public boolean isPrefersCustomSkulls()
      If the session wants custom skulls to be shown.
    • getCooldownPreference

      public CooldownUtils.CooldownType getCooldownPreference()
      Which CooldownType the client prefers. Initially set to CooldownUtils.getDefaultShowCooldown().
    • setPrefersShowCoordinates

      public void setPrefersShowCoordinates(boolean prefersShowCoordinates)
      True if the client prefers being shown their coordinates, regardless if they're being shown or not. This will be true everytime the client joins the server because neither the client nor server store the preference permanently.
    • setPrefersCustomSkulls

      public void setPrefersCustomSkulls(boolean prefersCustomSkulls)
      If the session wants custom skulls to be shown.
    • setCooldownPreference

      public void setCooldownPreference(CooldownUtils.CooldownType cooldownPreference)
      Which CooldownType the client prefers. Initially set to CooldownUtils.getDefaultShowCooldown().