public class Player extendsLivingEntityimplementsCommandSender,PermissionHolder,MetricProvider
Class Player. Provides player functionality for the Hytale server.
java.lang.Object > LivingEntity > Player
Field Summary
playerRef
Field playerRef.
data
Field data.
hotbarManager
Field hotbarManager.
gameMode
Field gameMode.
clientViewRadius
Field clientViewRadius.
lastSpawnTimeNanos
Field lastSpawnTimeNanos.
velocitySampleCount
Field velocitySampleCount.
velocitySampleIndex
Field velocitySampleIndex.
overrideBlockPlacementRestrictions
Field overrideBlockPlacementRestrictions.
executeTriggers
Field executeTriggers.
executeBlockDamage
Field executeBlockDamage.
firstSpawn
Field firstSpawn.
mountEntityId
Field mountEntityId.
ref
Field ref.
store
Field store.
tracker
Field tracker.
ref2
Field ref2.
store2
Field store2.
tracker2
Field tracker2.
task
Field task.
transformComponent
Field transformComponent.
position
Field position.
playerRefComponent
Field playerRefComponent.
oldTask
Field oldTask.
movementStatesComponent
Field movementStatesComponent.
uuidComponent
Field uuidComponent.
cameraManagerComponent
Field cameraManagerComponent.
movementManagerComponent
Field movementManagerComponent.
world
Field world.
itemNameMessage
Field itemNameMessage.
collisionResultComponent
Field collisionResultComponent.
x
Field x.
y
Field y.
z
Field z.
weights
Field weights.
k
Field k.
velocitySamples
Field velocitySamples.
n
Field n.
velocitySamples2
Field velocitySamples2.
n2
Field n2.
velocitySamples3
Field velocitySamples3.
n3
Field n3.
playerComponent
Field playerComponent.
playerConfigData
Field playerConfigData.
respawnPoints
Field respawnPoints.
worldSpawnPoint
Field worldSpawnPoint.
playerPosition
Field playerPosition.
sortedRespawnPoints
Field sortedRespawnPoints.
posB
Field posB.
distA
Field distA.
distB
Field distB.
playerBoundingBoxComponent
Field playerBoundingBoxComponent.
worldSpawnPoint2
Field worldSpawnPoint2.
respawnPosition
Field respawnPosition.
targetPlayerComponent
Field targetPlayerComponent.
transaction
Field transaction.
soundEventIndex
Field soundEventIndex.
oldGameMode
Field oldGameMode.
event
Field event.
permissionsModule
Field permissionsModule.
oldGameModeType
Field oldGameModeType.
gameModeType
Field gameModeType.
interactionManagerComponent
Field interactionManagerComponent.
interactions
Field interactions.
context
Field context.
rootInteraction
Field rootInteraction.
chain
Field chain.
player
Field player.
Method Detail
getComponentType
Player>
getComponentType
()
Method getComponentType.
Player
public
Player
()
Method Player.
setNetworkId
void
setNetworkId
(final int id)
Method setNetworkId.
- Parameters:
final intid
remove
boolean
remove
()
Method remove.
moveTo
void
moveTo
(@Nonnull final Ref ref, final double locX, final double locY, final double locZ, @Nonnull final ComponentAccessor componentAccessor)
Method moveTo.
- Parameters:
@Nonnull final Refreffinal doublelocXfinal doublelocYfinal doublelocZ@Nonnull final ComponentAccessorcomponentAccessor
markNeedsSave
void
markNeedsSave
()
Method markNeedsSave.
unloadFromWorld
void
unloadFromWorld
()
Method unloadFromWorld.
applyMovementStates
void
applyMovementStates
(@Nonnull final Ref ref, @Nonnull final SavedMovementStates savedMovementStates, @Nonnull final MovementStates movementStates, @Nonnull final ComponentAccessor componentAccessor)
Method applyMovementStates.
- Parameters:
@Nonnull final Refref@Nonnull final SavedMovementStatessavedMovementStates@Nonnull final MovementStatesmovementStates@Nonnull final ComponentAccessorcomponentAccessor
SetMovementStates
new
SetMovementStates
(new SavedMovementStates(movementStates.flying)
Method SetMovementStates.
- Parameters:
newSavedMovementStates(movementStates.flying
startClientReadyTimeout
void
startClientReadyTimeout
()
Method startClientReadyTimeout.
handleClientReady
void
handleClientReady
(final boolean forced)
Method handleClientReady.
- Parameters:
final booleanforced
PlayerReadyEvent
new
PlayerReadyEvent
(this.reference, this, this.readyId.getAndIncrement()
Method PlayerReadyEvent.
- Parameters:
this.referencethis.referencethisthisthis.readyId.getAndIncrement(this.readyId.getAndIncrement(
sendInventory
void
sendInventory
()
Method sendInventory.
isFirstSpawn
boolean
isFirstSpawn
()
Method isFirstSpawn.
setFirstSpawn
void
setFirstSpawn
(final boolean firstSpawn)
Method setFirstSpawn.
- Parameters:
final booleanfirstSpawn
notifyPickupItem
void
notifyPickupItem
(@Nonnull final Ref ref, @Nonnull final ItemStack itemStack, @Nullable final Vector3d position, @Nonnull final ComponentAccessor componentAccessor)
Method notifyPickupItem.
- Parameters:
@Nonnull final Refref@Nonnull final ItemStackitemStack@Nullable final Vector3dposition@Nonnull final ComponentAccessorcomponentAccessor
isOverrideBlockPlacementRestrictions
boolean
isOverrideBlockPlacementRestrictions
()
Method isOverrideBlockPlacementRestrictions.
setOverrideBlockPlacementRestrictions
void
setOverrideBlockPlacementRestrictions
(@Nonnull final Ref ref, final boolean overrideBlockPlacementRestrictions, @Nonnull final ComponentAccessor componentAccessor)
Method setOverrideBlockPlacementRestrictions.
- Parameters:
@Nonnull final Refreffinal booleanoverrideBlockPlacementRestrictions@Nonnull final ComponentAccessorcomponentAccessor
SetBlockPlacementOverride
new
SetBlockPlacementOverride
(overrideBlockPlacementRestrictions)
Method SetBlockPlacementOverride.
- Parameters:
overrideBlockPlacementRestrictionsoverrideBlockPlacementRestrictions
hasPermission
boolean
hasPermission
(@Nonnull final String id)
Method hasPermission.
- Parameters:
@Nonnull final Stringid
addLocationChange
void
addLocationChange
(@Nonnull final Ref ref, final double deltaX, final double deltaY, final double deltaZ, @Nonnull final ComponentAccessor componentAccessor)
Method addLocationChange.
- Parameters:
@Nonnull final Refreffinal doubledeltaXfinal doubledeltaYfinal doubledeltaZ@Nonnull final ComponentAccessorcomponentAccessor
configTriggerBlockProcessing
void
configTriggerBlockProcessing
(final boolean triggers, final boolean blockDamage, @Nonnull final CollisionResultComponent collisionResultComponent)
Method configTriggerBlockProcessing.
- Parameters:
final booleantriggersfinal booleanblockDamage@Nonnull final CollisionResultComponentcollisionResultComponent
processVelocitySample
void
processVelocitySample
(final double dt, @Nonnull final Vector3d position, @Nonnull final Velocity velocity)
Method processVelocitySample.
- Parameters:
final doubledt@Nonnull final Vector3dposition@Nonnull final Velocityvelocity
getRespawnPosition
Transform
getRespawnPosition
(@Nonnull final Ref ref, @Nonnull final String worldName, @Nonnull final ComponentAccessor componentAccessor)
Method getRespawnPosition.
- Parameters:
@Nonnull final Refref@Nonnull final StringworldName@Nonnull final ComponentAccessorcomponentAccessor
Transform
new
Transform
(sortedRespawnPoints.getFirst()
Method Transform.
- Parameters:
sortedRespawnPoints.getFirst(sortedRespawnPoints.getFirst(
ensureNoCollisionAtRespawnPosition
Vector3d>
ensureNoCollisionAtRespawnPosition
(final PlayerRespawnPointData playerRespawnPointData, final Box playerHitbox, final World world)
Method ensureNoCollisionAtRespawnPosition.
- Parameters:
final PlayerRespawnPointDataplayerRespawnPointDatafinal BoxplayerHitboxfinal Worldworld
Vector3d
new
Vector3d
(playerRespawnPointData.getRespawnPosition()
Method Vector3d.
- Parameters:
playerRespawnPointData.getRespawnPosition(playerRespawnPointData.getRespawnPosition(
CollisionResult
new
CollisionResult
()
Method CollisionResult.
hasSpawnProtection
boolean
hasSpawnProtection
()
Method hasSpawnProtection.
isWaitingForClientReady
boolean
isWaitingForClientReady
()
Method isWaitingForClientReady.
isHiddenFromLivingEntity
boolean
isHiddenFromLivingEntity
(@Nonnull final Ref ref, @Nonnull final Ref targetRef, @Nonnull final ComponentAccessor componentAccessor)
Method isHiddenFromLivingEntity.
- Parameters:
@Nonnull final Refref@Nonnull final ReftargetRef@Nonnull final ComponentAccessorcomponentAccessor
setClientViewRadius
void
setClientViewRadius
(final int clientViewRadius)
Method setClientViewRadius.
- Parameters:
final intclientViewRadius
getClientViewRadius
int
getClientViewRadius
()
Method getClientViewRadius.
getViewRadius
int
getViewRadius
()
Method getViewRadius.
canDecreaseItemStackDurability
boolean
canDecreaseItemStackDurability
(@Nonnull final Ref ref, @Nonnull final ComponentAccessor componentAccessor)
Method canDecreaseItemStackDurability.
- Parameters:
@Nonnull final Refref@Nonnull final ComponentAccessorcomponentAccessor
canApplyItemStackPenalties
boolean
canApplyItemStackPenalties
(@Nonnull final Ref ref, @Nonnull final ComponentAccessor componentAccessor)
Method canApplyItemStackPenalties.
- Parameters:
@Nonnull final Refref@Nonnull final ComponentAccessorcomponentAccessor
updateItemStackDurability
ItemStackSlotTransaction
updateItemStackDurability
(@Nonnull final Ref ref, @Nonnull final ItemStack itemStack, final ItemContainer container, final int slotId, final double durabilityChange, @Nonnull final ComponentAccessor componentAccessor)
Method updateItemStackDurability.
- Parameters:
@Nonnull final Refref@Nonnull final ItemStackitemStackfinal ItemContainercontainerfinal intslotIdfinal doubledurabilityChange@Nonnull final ComponentAccessorcomponentAccessor
setLastSpawnTimeNanos
void
setLastSpawnTimeNanos
(final long lastSpawnTimeNanos)
Method setLastSpawnTimeNanos.
- Parameters:
final longlastSpawnTimeNanos
getSinceLastSpawnNanos
long
getSinceLastSpawnNanos
()
Method getSinceLastSpawnNanos.
getMountEntityId
int
getMountEntityId
()
Method getMountEntityId.
setMountEntityId
void
setMountEntityId
(final int mountEntityId)
Method setMountEntityId.
- Parameters:
final intmountEntityId
setGameMode
void
setGameMode
(@Nonnull final Ref playerRef, @Nonnull final GameMode gameMode, @Nonnull final ComponentAccessor componentAccessor)
Method setGameMode.
- Parameters:
@Nonnull final RefplayerRef@Nonnull final GameModegameMode@Nonnull final ComponentAccessorcomponentAccessor
initGameMode
void
initGameMode
(@Nonnull final Ref playerRef, @Nonnull final ComponentAccessor componentAccessor)
Method initGameMode.
- Parameters:
@Nonnull final RefplayerRef@Nonnull final ComponentAccessorcomponentAccessor
setGameModeInternal
void
setGameModeInternal
(@Nonnull final Ref playerRef, @Nonnull final GameMode gameMode, @Nonnull final MovementManager movementManager, @Nonnull final ComponentAccessor componentAccessor)
Method setGameModeInternal.
- Parameters:
@Nonnull final RefplayerRef@Nonnull final GameModegameMode@Nonnull final MovementManagermovementManager@Nonnull final ComponentAccessorcomponentAccessor
SetGameMode
new
SetGameMode
(gameMode)
Method SetGameMode.
- Parameters:
gameModegameMode
runOnSwitchToGameMode
Method runOnSwitchToGameMode.
- Parameters:
@Nonnull final Refref@Nonnull final GameModegameMode
hashCode
int
hashCode
()
Method hashCode.
equals
boolean
equals
(@Nullable final Object o)
Method equals.
- Parameters:
@Nullable final Objecto
toString
String
toString
()
Method toString.
getDisplayName
String
getDisplayName
()
Method getDisplayName.