Class PreferencesCache
java.lang.Object
org.geysermc.geyser.session.cache.PreferencesCache
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionWhich CooldownType the client prefers.booleanIf the client's preference will be ignored, this will return false.booleanIf the session wants custom skulls to be shown.booleanTrue if the client prefers being shown their coordinates, regardless if they're being shown or not.voidsetCooldownPreference(CooldownUtils.CooldownType cooldownPreference)Which CooldownType the client prefers.voidsetPrefersCustomSkulls(boolean prefersCustomSkulls)If the session wants custom skulls to be shown.voidsetPrefersShowCoordinates(boolean prefersShowCoordinates)True if the client prefers being shown their coordinates, regardless if they're being shown or not.booleanvoidTell the client to hide or show the coordinates.
-
Constructor Details
-
PreferencesCache
-
-
Method Details
-
updateShowCoordinates
public void updateShowCoordinates()Tell the client to hide or show the coordinates. IfprefersShowCoordinatesis true, coordinates will be shown, unless either of the following conditions apply:
GeyserSession.reducedDebugInfois enabledGeyserConfiguration.isShowCoordinates()is disabled -
showCustomSkulls
public boolean showCustomSkulls()- Returns:
- true if the session prefers custom skulls, and the config allows them.
-
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
Which CooldownType the client prefers. Initially set toCooldownUtils.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
Which CooldownType the client prefers. Initially set toCooldownUtils.getDefaultShowCooldown().
-