Class PlayerEntity

All Implemented Interfaces:
org.geysermc.geyser.api.entity.type.GeyserEntity, org.geysermc.geyser.api.entity.type.player.GeyserPlayerEntity, Tickable
Direct Known Subclasses:
SessionPlayerEntity

public class PlayerEntity extends AvatarEntity implements org.geysermc.geyser.api.entity.type.player.GeyserPlayerEntity
  • Constructor Details

  • 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 AvatarEntity
    • despawnEntity

      public void despawnEntity()
      Description copied from class: Entity
      Despawns the entity
      Overrides:
      despawnEntity in class Entity
    • resetMetadata

      public void resetMetadata()
    • sendPlayer

      public void sendPlayer()
    • moveAbsoluteRaw

      public void moveAbsoluteRaw(org.cloudburstmc.math.vector.Vector3f position, float yaw, float pitch, float headYaw, boolean isOnGround, boolean teleported)
      Overrides:
      moveAbsoluteRaw in class AvatarEntity
    • moveRelativeRaw

      public void moveRelativeRaw(double relX, double relY, double relZ, float yaw, float pitch, float headYaw, boolean isOnGround)
      Overrides:
      moveRelativeRaw in class AvatarEntity
    • setAbsorptionHearts

      public void setAbsorptionHearts(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.FloatEntityMetadata entityMetadata)
    • setLeftParrot

      public void setLeftParrot(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.EntityMetadata<OptionalInt,?> entityMetadata)
    • setRightParrot

      public void setRightParrot(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.EntityMetadata<OptionalInt,?> entityMetadata)
    • setParrot

      protected void setParrot(OptionalInt variant, boolean isLeft)
      Sets the parrot occupying the shoulder. Bedrock Edition requires a full entity whereas Java Edition just spawns it from the NBT data provided
    • teamIdentifier

      public String teamIdentifier()
      Overrides:
      teamIdentifier in class Entity
    • setNametag

      protected void setNametag(@Nullable String nametag, boolean fromDisplayName)
      Overrides:
      setNametag in class Entity
    • setUsername

      public void setUsername(String username)
    • getTabListUuid

      public UUID getTabListUuid()
      Returns:
      the UUID that should be used when dealing with Bedrock's tab list.
    • position

      public org.cloudburstmc.math.vector.Vector3f position()
      Specified by:
      position in interface org.geysermc.geyser.api.entity.type.player.GeyserPlayerEntity
    • getDesiredPose

      public org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.Pose getDesiredPose()
    • getLeftParrot

      public @Nullable ParrotEntity getLeftParrot()
      Saves the parrot currently on the player's left shoulder; otherwise null
    • getRightParrot

      public @Nullable ParrotEntity getRightParrot()
      Saves the parrot currently on the player's right shoulder; otherwise null
    • isListed

      public boolean isListed()
      Whether this player is currently listed.
      Specified by:
      isListed in class AvatarEntity
      Returns:
      whether this player entity is listed
      See Also:
    • setListed

      public void setListed(boolean listed)
      Whether this player is currently listed.