Contents
Class ServerPlayerListModule
java.lang.Object
com.hypixel.hytale.server.core.plugin.PluginBase
com.hypixel.hytale.server.core.plugin.JavaPlugin
com.hypixel.hytale.server.core.modules.serverplayerlist.ServerPlayerListModule
- All Implemented Interfaces:
CommandOwner
A module that manages the server-wide player list.
This module tracks all players connected to the server and sends updates when players connect or disconnect from the server.
A spectating player is flagged on their list entry. Per-viewer hides from
HiddenPlayersManager drop the
hidden player from just that viewer's list.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PluginManifestThe manifest for theServerPlayerListModulemodule.Fields inherited from class PluginBase
METRICS_REGISTRY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbroadcastListEntry(PlayerRef subjectRef) Broadcasts a player's list entry as an upsert to every viewer who can see them, reading their current spectating status.voidbroadcastListEntry(PlayerRef subjectRef, boolean spectating) Broadcasts a player's list entry as an upsert to every viewer who can see them, refreshing their spectating status.voidbroadcastLivesChange(PlayerRef subjectRef) Broadcasts a player's list entry after their remaining lives change.static ServerPlayerListModuleget()voidonPlayerHiddenForViewer(PlayerRef viewerRef, UUID subjectUuid) Drops a player from one viewer's list after the viewer hid them.voidonPlayerShownForViewer(PlayerRef viewerRef, UUID subjectUuid) Restores a player to one viewer's list after the viewer unhid them.Methods inherited from class JavaPlugin
getClassLoader, getFile, getTypeMethods inherited from class PluginBase
getAssetRegistry, getBasePermission, getChunkStoreRegistry, getClientFeatureRegistry, getCodecRegistry, getCodecRegistry, getCodecRegistry, getCommandRegistry, getDataDirectory, getEntityRegistry, getEntityStoreRegistry, getEventRegistry, getIdentifier, getLogger, getManifest, getName, getState, getTaskRegistry, isDisabled, isEnabled, preLoad
-
Field Details
-
MANIFEST
The manifest for theServerPlayerListModulemodule.
-
-
Constructor Details
-
ServerPlayerListModule
Default Constructor for aServerPlayerListModuleinstance.- Parameters:
init- The plugin initialization step for this plugin.
-
-
Method Details
-
get
- Returns:
- the singleton instance of the
ServerPlayerListModule.
-
broadcastLivesChange
Broadcasts a player's list entry after their remaining lives change. Only a multi-lifeHardcoreMode.PerPlayeruniverse carries a lives count in the list (HardcoreMode.showsPersonalLives(int)), so the other modes broadcast nothing.- Parameters:
subjectRef- The player whose entry to broadcast.
-
broadcastListEntry
Broadcasts a player's list entry as an upsert to every viewer who can see them, reading their current spectating status.- Parameters:
subjectRef- The player whose entry to broadcast.
-
broadcastListEntry
Broadcasts a player's list entry as an upsert to every viewer who can see them, refreshing their spectating status. Called when the player starts or stops spectating.- Parameters:
subjectRef- The player whose entry to broadcast.spectating- Whether the player is currently spectating.
-
onPlayerHiddenForViewer
-
onPlayerShownForViewer
-