Class PreferencesCache
java.lang.Object
org.geysermc.geyser.session.cache.PreferencesCache
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionWhich CooldownType the client prefers.boolean
If the client's preference will be ignored, this will return false.boolean
If the session wants custom skulls to be shown.boolean
True if the client prefers being shown their coordinates, regardless if they're being shown or not.void
setCooldownPreference(CooldownUtils.CooldownType cooldownPreference)
Which CooldownType the client prefers.void
setPrefersCustomSkulls(boolean prefersCustomSkulls)
If the session wants custom skulls to be shown.void
setPrefersShowCoordinates(boolean prefersShowCoordinates)
True if the client prefers being shown their coordinates, regardless if they're being shown or not.boolean
void
Tell 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. IfprefersShowCoordinates
is true, coordinates will be shown, unless either of the following conditions apply:
GeyserSession.reducedDebugInfo
is 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()
.
-