Class PlayerEntity

Direct Known Subclasses:
SessionPlayerEntity, SkullPlayerEntity

public class PlayerEntity extends LivingEntity
  • Field Details

    • SNEAKING_POSE_HEIGHT

      public static final float SNEAKING_POSE_HEIGHT
      See Also:
      Constant Field Values
    • BASE_ABILITY_LAYER

      protected static final List<com.nukkitx.protocol.bedrock.data.AbilityLayer> BASE_ABILITY_LAYER
  • Constructor Details

    • PlayerEntity

      public PlayerEntity(GeyserSession session, int entityId, long geyserId, UUID uuid, com.nukkitx.math.vector.Vector3f position, com.nukkitx.math.vector.Vector3f motion, float yaw, float pitch, float headYaw, String username, @Nullable String texturesProperty)
  • Method Details

    • initializeMetadata

      protected void initializeMetadata()
      Description copied from class: Entity
      Called on entity spawn. Used to populate the entity metadata and flags with default values.
      Overrides:
      initializeMetadata in class LivingEntity
    • spawnEntity

      public void spawnEntity()
      Overrides:
      spawnEntity in class Entity
    • sendPlayer

      public void sendPlayer()
    • moveAbsolute

      public void moveAbsolute(com.nukkitx.math.vector.Vector3f position, float yaw, float pitch, float headYaw, boolean isOnGround, boolean teleported)
      Overrides:
      moveAbsolute in class Entity
    • moveRelative

      public void moveRelative(double relX, double relY, double relZ, float yaw, float pitch, float headYaw, boolean isOnGround)
      Overrides:
      moveRelative in class Entity
    • updateRotation

      public void updateRotation(float yaw, float pitch, float headYaw, boolean isOnGround)
    • setPosition

      public void setPosition(com.nukkitx.math.vector.Vector3f position)
    • setBedPosition

      public com.nukkitx.math.vector.Vector3i setBedPosition(com.github.steveice10.mc.protocol.data.game.entity.metadata.EntityMetadata<Optional<com.nukkitx.math.vector.Vector3i>,​?> entityMetadata)
      Overrides:
      setBedPosition in class LivingEntity
    • setAbsorptionHearts

      public void setAbsorptionHearts(com.github.steveice10.mc.protocol.data.game.entity.metadata.type.FloatEntityMetadata entityMetadata)
    • setSkinVisibility

      public void setSkinVisibility(com.github.steveice10.mc.protocol.data.game.entity.metadata.type.ByteEntityMetadata entityMetadata)
    • setLeftParrot

      public void setLeftParrot(com.github.steveice10.mc.protocol.data.game.entity.metadata.EntityMetadata<com.github.steveice10.opennbt.tag.builtin.CompoundTag,​?> entityMetadata)
    • setRightParrot

      public void setRightParrot(com.github.steveice10.mc.protocol.data.game.entity.metadata.EntityMetadata<com.github.steveice10.opennbt.tag.builtin.CompoundTag,​?> entityMetadata)
    • setDisplayName

      public void setDisplayName(com.github.steveice10.mc.protocol.data.game.entity.metadata.EntityMetadata<Optional<net.kyori.adventure.text.Component>,​?> entityMetadata)
      Overrides:
      setDisplayName in class Entity
    • updateDisplayName

      public void updateDisplayName(@Nullable Team team, boolean useGivenTeam)
      Parameters:
      useGivenTeam - even if there is no team, update the username in the entity metadata anyway, and don't look for a team
    • setDisplayNameVisible

      public void setDisplayNameVisible(com.github.steveice10.mc.protocol.data.game.entity.metadata.type.BooleanEntityMetadata entityMetadata)
      Overrides:
      setDisplayNameVisible in class Entity
    • setDimensions

      protected void setDimensions(com.github.steveice10.mc.protocol.data.game.entity.metadata.Pose pose)
      Description copied from class: Entity
      Set the height and width of the entity's bounding box
      Overrides:
      setDimensions in class LivingEntity
    • setBelowNameText

      public void setBelowNameText(Objective objective)