PlayerRef

public class PlayerRef implements Component, MetricProvider, IMessageReceiver

Class PlayerRef. Provides playerref functionality for the Hytale server.

java.lang.Object > PlayerRef

Field Summary

language

private String language

Field language.

entity

private Ref entity

Field entity.

holder

private Holder holder

Field holder.

worldUuid

private UUID worldUuid

Field worldUuid.

transform

private Transform transform

Field transform.

headRotation

private Vector3f headRotation

Field headRotation.

store

final Store store

Field store.

MAX_REFERRAL_DATA_SIZE

final int MAX_REFERRAL_DATA_SIZE

Field MAX_REFERRAL_DATA_SIZE.

handler

final PacketHandler handler

Field handler.

pongTypes

final PongType[] pongTypes

Field pongTypes.

pingInfos

final PacketHandler.PingInfo[] pingInfos

Field pingInfos.

recorder

final PacketStatsRecorder recorder

Field recorder.

impl

final PacketStatsRecorderImpl impl

Field impl.

entityRef

final Ref entityRef

Field entityRef.

component

final MovementStatesComponent component

Field component.

entityRef2

final Ref entityRef2

Field entityRef2.

component2

final MovementManager component2

Field component2.

entityRef3

final Ref entityRef3

Field entityRef3.

component3

final CameraManager component3

Field component3.

Method Detail

getComponentType

public PlayerRef> getComponentType ()

Method getComponentType.

PlayerRef

public public PlayerRef (@Nonnull final Holder holder, @Nonnull final UUID uuid, @Nonnull final String username, @Nonnull final String language, @Nonnull final PacketHandler packetHandler, @Nonnull final ChunkTracker chunkTracker)

Method PlayerRef.

Parameters:
@Nonnull final Holder holder
@Nonnull final UUID uuid
@Nonnull final String username
@Nonnull final String language
@Nonnull final PacketHandler packetHandler
@Nonnull final ChunkTracker chunkTracker

addToStore

public Ref addToStore (@Nonnull final Store store)

Method addToStore.

Parameters:
@Nonnull final Store store

addedToStore

public void addedToStore (final Ref ref)

Method addedToStore.

Parameters:
final Ref ref

removeFromStore

public Holder removeFromStore ()

Method removeFromStore.

isValid

public boolean isValid ()

Method isValid.

getReference

public Ref getReference ()

Method getReference.

getHolder

public Holder getHolder ()

Method getHolder.

getComponent

public T getComponent (@Nonnull final ComponentType componentType)

Method getComponent.

Parameters:
@Nonnull final ComponentType componentType

SkipSentryException

public new SkipSentryException ()

Method SkipSentryException.

getUuid

public UUID getUuid ()

Method getUuid.

getUsername

public String getUsername ()

Method getUsername.

getPacketHandler

public PacketHandler getPacketHandler ()

Method getPacketHandler.

getChunkTracker

public ChunkTracker getChunkTracker ()

Method getChunkTracker.

getHiddenPlayersManager

public HiddenPlayersManager getHiddenPlayersManager ()

Method getHiddenPlayersManager.

getLanguage

public String getLanguage ()

Method getLanguage.

setLanguage

public void setLanguage (@Nonnull final String language)

Method setLanguage.

Parameters:
@Nonnull final String language

getTransform

public Transform getTransform ()

Method getTransform.

getWorldUuid

public UUID getWorldUuid ()

Method getWorldUuid.

getHeadRotation

public Vector3f getHeadRotation ()

Method getHeadRotation.

updatePosition

public void updatePosition (@Nonnull final World world, @Nonnull final Transform transform, @Nonnull final Vector3f headRotation)

Method updatePosition.

Parameters:
@Nonnull final World world
@Nonnull final Transform transform
@Nonnull final Vector3f headRotation

replaceHolder

public void replaceHolder (@Nonnull final Holder holder)

Method replaceHolder.

Parameters:
@Nonnull final Holder holder

clone

public Component clone ()

Method clone.

toMetricResults

public MetricResults toMetricResults ()

Method toMetricResults.

referToServer

public void referToServer (@Nonnull final String host, final int port)

Method referToServer.

Parameters:
@Nonnull final String host
final int port

ClientReferral

public new ClientReferral (new HostAddress(host, (short)

Method ClientReferral.

Parameters:
new HostAddress(host
(short (short

sendMessage

public void sendMessage (@Nonnull final Message message)

Method sendMessage.

Parameters:
@Nonnull final Message message

ServerMessage

public new ServerMessage (ChatType.Chat, message.getFormattedMessage()

Method ServerMessage.

Parameters:
ChatType.Chat ChatType.Chat
message.getFormattedMessage( message.getFormattedMessage(

ArrayCodec

public new ArrayCodec ((Codec)

Method ArrayCodec.

Parameters:
(Codec (Codec