ServerPlayerListModule

public class ServerPlayerListModule extends JavaPlugin

Class ServerPlayerListModule. Provides serverplayerlistmodule functionality for the Hytale server.

java.lang.Object > JavaPlugin > ServerPlayerListModule

Field Summary

eventRegistry

final EventRegistry eventRegistry

Field eventRegistry.

joiningPlayerRef

final PlayerRef joiningPlayerRef

Field joiningPlayerRef.

joiningPlayerUuid

final UUID joiningPlayerUuid

Field joiningPlayerUuid.

allPlayers

final List allPlayers

Field allPlayers.

serverListPlayers

final ServerPlayerListPlayer[] serverListPlayers

Field serverListPlayers.

fullListPacket

final AddToServerPlayerList fullListPacket

Field fullListPacket.

newPlayerPacket

final AddToServerPlayerList newPlayerPacket

Field newPlayerPacket.

leavingPlayerRef

final PlayerRef leavingPlayerRef

Field leavingPlayerRef.

leavingPlayerUuid

final UUID leavingPlayerUuid

Field leavingPlayerUuid.

removePacket

final RemoveFromServerPlayerList removePacket

Field removePacket.

holder

final Holder holder

Field holder.

playerRefComponent

final PlayerRef playerRefComponent

Field playerRefComponent.

playerUuid

final UUID playerUuid

Field playerUuid.

worldUuid

final UUID worldUuid

Field worldUuid.

updatePacket

final UpdateServerPlayerList updatePacket

Field updatePacket.

pingMap

final Object2IntOpenHashMap pingMap

Field pingMap.

packet

final UpdateServerPlayerListPing packet

Field packet.

historicMetric

final HistoricMetric historicMetric

Field historicMetric.

average

final double average

Field average.

Method Detail

get

static ServerPlayerListModule get ()

Method get.

ServerPlayerListModule

public public ServerPlayerListModule (@Nonnull final JavaPluginInit init)

Method ServerPlayerListModule.

Parameters:
@Nonnull final JavaPluginInit init

setup

protected void setup ()

Method setup.

onPlayerConnect

private void onPlayerConnect (@Nonnull final PlayerConnectEvent event)

Method onPlayerConnect.

Parameters:
@Nonnull final PlayerConnectEvent event

onPlayerDisconnect

private void onPlayerDisconnect (@Nonnull final PlayerDisconnectEvent event)

Method onPlayerDisconnect.

Parameters:
@Nonnull final PlayerDisconnectEvent event

onPlayerAddedToWorld

private void onPlayerAddedToWorld (@Nonnull final AddPlayerToWorldEvent event)

Method onPlayerAddedToWorld.

Parameters:
@Nonnull final AddPlayerToWorldEvent event

UpdateServerPlayerList

public new UpdateServerPlayerList (new ServerPlayerListUpdate[] { new ServerPlayerListUpdate(playerUuid, worldUuid)

Method UpdateServerPlayerList.

Parameters:
new ServerPlayerListUpdate[] { new ServerPlayerListUpdate(playerUuid
worldUuid worldUuid

broadcastPingUpdates

private void broadcastPingUpdates ()

Method broadcastPingUpdates.

getPingValue

static int getPingValue (@Nonnull final PacketHandler handler)

Method getPingValue.

Parameters:
@Nonnull final PacketHandler handler

createServerPlayerListPlayer

static ServerPlayerListPlayer createServerPlayerListPlayer (@Nonnull final PlayerRef playerRef)

Method createServerPlayerListPlayer.

Parameters:
@Nonnull final PlayerRef playerRef

ServerPlayerListPlayer

public new ServerPlayerListPlayer (playerRef.getUuid()

Method ServerPlayerListPlayer.

Parameters:
playerRef.getUuid( playerRef.getUuid(