Class Player
java.lang.Object
com.hypixel.hytale.server.core.entity.Entity
com.hypixel.hytale.server.core.entity.LivingEntity
com.hypixel.hytale.server.core.entity.entities.Player
- All Implemented Interfaces:
Component<EntityStore>,MetricProvider,CommandSender,PermissionHolder,IMessageReceiver,Cloneable
-
Nested Class Summary
Nested classes/interfaces inherited from class com.hypixel.hytale.server.core.entity.Entity
Entity.DefaultAnimations -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intstatic final BuilderCodec<Player> private PlayerConfigDatastatic final intbooleanbooleanprivate booleanprivate GameModeprivate HotbarManagerprivate final HudManagerprotected longstatic final longprivate static final intstatic final MetricsRegistry<Player> private intprivate booleanprivate final PageManagerstatic final KeyedCodec<PlayerConfigData> private PlayerRefDeprecated, for removal: This API element is subject to removal in a future version.private final AtomicIntegerstatic final longprivate static final intprivate intprivate intprivate final double[]private static final double[][]private final AtomicReference<ScheduledFuture<?>> private final WindowManagerprivate final WorldMapTrackerFields inherited from class com.hypixel.hytale.server.core.entity.LivingEntity
currentFallDistance, DEFAULT_ITEM_THROW_SPEEDFields inherited from class com.hypixel.hytale.server.core.entity.Entity
DISPLAY_NAME, legacyDisplayName, legacyUuid, LOGGER, MODEL, networkId, reference, removedBy, UNASSIGNED_ID, UUID, VERSION, wasRemoved, worldFields inherited from interface com.hypixel.hytale.component.Component
EMPTY_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLocationChange(Ref<EntityStore> ref, double deltaX, double deltaY, double deltaZ, ComponentAccessor<EntityStore> componentAccessor) voidapplyMovementStates(Ref<EntityStore> ref, SavedMovementStates savedMovementStates, MovementStates movementStates, ComponentAccessor<EntityStore> componentAccessor) booleancanApplyItemStackPenalties(Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) booleancanDecreaseItemStackDurability(Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) voidconfigTriggerBlockProcessing(boolean triggers, boolean blockDamage, CollisionResultComponent collisionResultComponent) voidprotected InventoryensureNoCollisionAtRespawnPosition(PlayerRespawnPointData playerRespawnPointData, Box playerHitbox, World world) booleanintstatic ComponentType<EntityStore, Player> intDeprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.static TransformgetRespawnPosition(Ref<EntityStore> ref, String worldName, ComponentAccessor<EntityStore> componentAccessor) longintvoidhandleClientReady(boolean forced) inthashCode()booleanhasPermission(String id) booleanhasPermission(String id, boolean def) booleanvoidstatic voidinitGameMode(Ref<EntityStore> playerRef, ComponentAccessor<EntityStore> componentAccessor) booleanbooleanisHiddenFromLivingEntity(Ref<EntityStore> ref, Ref<EntityStore> targetRef, ComponentAccessor<EntityStore> componentAccessor) booleanbooleanvoidvoidmoveTo(Ref<EntityStore> ref, double locX, double locY, double locZ, ComponentAccessor<EntityStore> componentAccessor) voidnotifyPickupItem(Ref<EntityStore> ref, ItemStack itemStack, Vector3d position, ComponentAccessor<EntityStore> componentAccessor) voidprocessVelocitySample(double dt, Vector3d position, Velocity velocity) booleanremove()voidresetManagers(Holder<EntityStore> holder) voidresetVelocity(Velocity velocity) private static voidrunOnSwitchToGameMode(Ref<EntityStore> ref, GameMode gameMode) saveConfig(World world, Holder<EntityStore> holder) voidvoidsendMessage(Message message) voidsetClientViewRadius(int clientViewRadius) voidsetFirstSpawn(boolean firstSpawn) static voidsetGameMode(Ref<EntityStore> playerRef, GameMode gameMode, ComponentAccessor<EntityStore> componentAccessor) private static voidsetGameModeInternal(Ref<EntityStore> playerRef, GameMode gameMode, MovementManager movementManager, ComponentAccessor<EntityStore> componentAccessor) setInventory(Inventory inventory) voidsetLastSpawnTimeNanos(long lastSpawnTimeNanos) voidsetMountEntityId(int mountEntityId) voidsetNetworkId(int id) voidsetOverrideBlockPlacementRestrictions(Ref<EntityStore> ref, boolean overrideBlockPlacementRestrictions, ComponentAccessor<EntityStore> componentAccessor) voidtoString()voidupdateItemStackDurability(Ref<EntityStore> ref, ItemStack itemStack, ItemContainer container, int slotId, double durabilityChange, ComponentAccessor<EntityStore> componentAccessor) Methods inherited from class com.hypixel.hytale.server.core.entity.LivingEntity
canBreathe, consumeEquipmentNetworkOutdated, decreaseItemStackDurability, getCurrentFallDistance, getInventory, getPackedMaterialAndFluidAtBreathingHeight, getStatModifiersManager, invalidateEquipmentNetwork, setCurrentFallDistance, setInventory, setInventoryMethods inherited from class com.hypixel.hytale.server.core.entity.Entity
clearReference, clone, getLegacyDisplayName, getNetworkId, getReference, getTransformComponent, getUuid, getWorld, isCollidable, loadIntoWorld, setLegacyUUID, setReference, setTransformComponent, toHolder, wasRemovedMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.hypixel.hytale.server.core.command.system.CommandSender
getUuidMethods inherited from interface com.hypixel.hytale.component.Component
cloneSerializable
-
Field Details
-
METRICS_REGISTRY
-
PLAYER_CONFIG_DATA
-
CODEC
-
DEFAULT_VIEW_RADIUS_CHUNKS
public static final int DEFAULT_VIEW_RADIUS_CHUNKS- See Also:
-
RESPAWN_INVULNERABILITY_TIME_NANOS
public static final long RESPAWN_INVULNERABILITY_TIME_NANOS -
MAX_TELEPORT_INVULNERABILITY_MILLIS
public static final long MAX_TELEPORT_INVULNERABILITY_MILLIS- See Also:
-
playerRef
Deprecated, for removal: This API element is subject to removal in a future version. -
data
-
worldMapTracker
-
windowManager
-
pageManager
-
hudManager
-
hotbarManager
-
gameMode
-
clientViewRadius
private int clientViewRadius -
lastSpawnTimeNanos
protected long lastSpawnTimeNanos -
MAX_VELOCITY_SAMPLE_COUNT
private static final int MAX_VELOCITY_SAMPLE_COUNT- See Also:
-
VELOCITY_SAMPLE_LENGTH
private static final int VELOCITY_SAMPLE_LENGTH- See Also:
-
velocitySampleWeights
private static final double[][] velocitySampleWeights -
velocitySamples
private final double[] velocitySamples -
velocitySampleCount
private int velocitySampleCount -
velocitySampleIndex
private int velocitySampleIndex -
overrideBlockPlacementRestrictions
private boolean overrideBlockPlacementRestrictions -
readyId
-
waitingForClientReady
-
executeTriggers
public boolean executeTriggers -
executeBlockDamage
public boolean executeBlockDamage -
firstSpawn
private boolean firstSpawn -
mountEntityId
private int mountEntityId
-
-
Constructor Details
-
Player
public Player()
-
-
Method Details
-
getComponentType
-
copyFrom
-
init
-
setNetworkId
public void setNetworkId(int id) -
createDefaultInventory
- Specified by:
createDefaultInventoryin classLivingEntity
-
setInventory
- Overrides:
setInventoryin classLivingEntity
-
remove
public boolean remove() -
moveTo
public void moveTo(@Nonnull Ref<EntityStore> ref, double locX, double locY, double locZ, @Nonnull ComponentAccessor<EntityStore> componentAccessor) - Overrides:
moveToin classLivingEntity
-
getPlayerConfigData
-
markNeedsSave
public void markNeedsSave()- Overrides:
markNeedsSavein classEntity
-
unloadFromWorld
public void unloadFromWorld()- Overrides:
unloadFromWorldin classEntity
-
applyMovementStates
public void applyMovementStates(@Nonnull Ref<EntityStore> ref, @Nonnull SavedMovementStates savedMovementStates, @Nonnull MovementStates movementStates, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
startClientReadyTimeout
public void startClientReadyTimeout() -
handleClientReady
public void handleClientReady(boolean forced) -
sendInventory
public void sendInventory() -
saveConfig
@Nonnull public CompletableFuture<Void> saveConfig(@Nonnull World world, @Nonnull Holder<EntityStore> holder) -
getPlayerConnection
Deprecated, for removal: This API element is subject to removal in a future version. -
getWorldMapTracker
-
getWindowManager
-
getPageManager
-
getHudManager
-
getHotbarManager
-
isFirstSpawn
public boolean isFirstSpawn() -
setFirstSpawn
public void setFirstSpawn(boolean firstSpawn) -
resetManagers
-
notifyPickupItem
public void notifyPickupItem(@Nonnull Ref<EntityStore> ref, @Nonnull ItemStack itemStack, @Nullable Vector3d position, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
isOverrideBlockPlacementRestrictions
public boolean isOverrideBlockPlacementRestrictions() -
setOverrideBlockPlacementRestrictions
public void setOverrideBlockPlacementRestrictions(@Nonnull Ref<EntityStore> ref, boolean overrideBlockPlacementRestrictions, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
sendMessage
- Specified by:
sendMessagein interfaceIMessageReceiver
-
hasPermission
- Specified by:
hasPermissionin interfacePermissionHolder
-
hasPermission
- Specified by:
hasPermissionin interfacePermissionHolder
-
addLocationChange
public void addLocationChange(@Nonnull Ref<EntityStore> ref, double deltaX, double deltaY, double deltaZ, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
configTriggerBlockProcessing
public void configTriggerBlockProcessing(boolean triggers, boolean blockDamage, @Nonnull CollisionResultComponent collisionResultComponent) -
resetVelocity
-
processVelocitySample
-
getRespawnPosition
@Nonnull public static Transform getRespawnPosition(@Nonnull Ref<EntityStore> ref, @Nonnull String worldName, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
ensureNoCollisionAtRespawnPosition
private static it.unimi.dsi.fastutil.Pair<Boolean,Vector3d> ensureNoCollisionAtRespawnPosition(PlayerRespawnPointData playerRespawnPointData, Box playerHitbox, World world) -
hasSpawnProtection
public boolean hasSpawnProtection() -
isWaitingForClientReady
public boolean isWaitingForClientReady() -
isHiddenFromLivingEntity
public boolean isHiddenFromLivingEntity(@Nonnull Ref<EntityStore> ref, @Nonnull Ref<EntityStore> targetRef, @Nonnull ComponentAccessor<EntityStore> componentAccessor) - Overrides:
isHiddenFromLivingEntityin classEntity
-
setClientViewRadius
public void setClientViewRadius(int clientViewRadius) -
getClientViewRadius
public int getClientViewRadius() -
getViewRadius
public int getViewRadius() -
canDecreaseItemStackDurability
public boolean canDecreaseItemStackDurability(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> componentAccessor) - Overrides:
canDecreaseItemStackDurabilityin classLivingEntity
-
canApplyItemStackPenalties
public boolean canApplyItemStackPenalties(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> componentAccessor) - Overrides:
canApplyItemStackPenaltiesin classLivingEntity
-
updateItemStackDurability
@Nullable public ItemStackSlotTransaction updateItemStackDurability(@Nonnull Ref<EntityStore> ref, @Nonnull ItemStack itemStack, ItemContainer container, int slotId, double durabilityChange, @Nonnull ComponentAccessor<EntityStore> componentAccessor) - Overrides:
updateItemStackDurabilityin classLivingEntity
-
toMetricResults
- Specified by:
toMetricResultsin interfaceMetricProvider
-
setLastSpawnTimeNanos
public void setLastSpawnTimeNanos(long lastSpawnTimeNanos) -
getSinceLastSpawnNanos
public long getSinceLastSpawnNanos() -
getPlayerRef
Deprecated, for removal: This API element is subject to removal in a future version. -
getMountEntityId
public int getMountEntityId() -
setMountEntityId
public void setMountEntityId(int mountEntityId) -
getGameMode
-
setGameMode
public static void setGameMode(@Nonnull Ref<EntityStore> playerRef, @Nonnull GameMode gameMode, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
initGameMode
public static void initGameMode(@Nonnull Ref<EntityStore> playerRef, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
setGameModeInternal
private static void setGameModeInternal(@Nonnull Ref<EntityStore> playerRef, @Nonnull GameMode gameMode, @Nonnull MovementManager movementManager, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
runOnSwitchToGameMode
private static void runOnSwitchToGameMode(@Nonnull Ref<EntityStore> ref, @Nonnull GameMode gameMode) -
hashCode
public int hashCode() -
equals
-
toString
- Overrides:
toStringin classLivingEntity
-
getDisplayName
- Specified by:
getDisplayNamein interfaceCommandSender
-