Interface EntityData


public interface EntityData
Provides entity lookup and input-lock utilities for a specific connection. Accessible via GeyserConnection.entities().
  • Method Details

    • entityByJavaId

      @Deprecated(since="2.11.0") CompletableFuture<@Nullable GeyserEntity> entityByJavaId(@org.checkerframework.checker.index.qual.NonNegative int javaId)
      Deprecated.
      Since:
      2.3.0
    • byJavaId

      @Nullable GeyserEntity byJavaId(@org.checkerframework.checker.index.qual.NonNegative int javaId)
      Returns the GeyserEntity for the given Java entity ID if it is tracked in this connection's entity cache, or null if not found.
      Parameters:
      javaId - the Java entity ID to look up
      Returns:
      the entity, or null if not found
      Since:
      2.11.0
    • byUuid

      @Nullable GeyserEntity byUuid(UUID javaUuid)
      Returns the GeyserEntity for the given Java entity UUID if it is tracked in this connection's entity cache, or null if not found.
      Parameters:
      javaUuid - the Java entity UUID to look up
      Returns:
      the entity, or null if not found
      Since:
      2.11.0
    • byGeyserId

      @Nullable GeyserEntity byGeyserId(@org.checkerframework.checker.index.qual.NonNegative long geyserId)
      Returns the GeyserEntity for the given Geyser runtime entity ID if it is tracked in this connection's entity cache, or null if not found.
      Parameters:
      geyserId - the Geyser entity ID (as returned by GeyserEntity.geyserId())
      Returns:
      the entity, or null if not found
      Since:
      2.11.0
    • lockMovement

      boolean lockMovement(boolean lock, UUID owner)
      (Un)locks the client's movement inputs, so that they cannot move. To ensure that movement is only unlocked when all locks are released, you must supply a UUID with this method, and use the same UUID to unlock the camera.
      Parameters:
      lock - whether to lock the movement
      owner - the owner of the lock
      Returns:
      if the movement is locked after this method call
    • isMovementLocked

      boolean isMovementLocked()
      Returns whether the client's movement is currently locked.
      Returns:
      whether the movement is locked
    • switchHands

      @Deprecated(since="2.9.3") void switchHands()
      Deprecated.
    • showEmote

      @Deprecated(since="2.9.3") void showEmote(GeyserPlayerEntity emoter, String emoteId)
    • playerEntity

      @Deprecated(since="2.9.3") GeyserPlayerEntity playerEntity()
      Deprecated.