Package org.geysermc.geyser.api.entity
Interface EntityData
public interface EntityData
This class holds all the methods that relate to entities.
Can be accessed through
GeyserConnection.entities().-
Method Summary
Modifier and TypeMethodDescription@Nullable GeyserEntitybyGeyserId(@org.checkerframework.checker.index.qual.NonNegative long geyserId) Returns aGeyserEntitybased on a Geyser entity id@Nullable GeyserEntitybyJavaId(@org.checkerframework.checker.index.qual.NonNegative int javaId) Returns aGeyserEntityto e.g.@Nullable GeyserEntityReturns aGeyserEntityto e.g.@NonNull CompletableFuture<@Nullable GeyserEntity>entityByJavaId(@org.checkerframework.checker.index.qual.NonNegative int javaId) Deprecated.booleanReturns whether the client's movement is currently locked.booleanlockMovement(boolean lock, @NonNull UUID owner) (Un)locks the client's movement inputs, so that they cannot move.@NonNull GeyserPlayerEntityDeprecated.UseGeyserConnection.playerEntity()instead.voidshowEmote(@NonNull GeyserPlayerEntity emoter, @NonNull String emoteId) Deprecated.voidDeprecated.useGeyserConnection.requestOffhandSwap()instead
-
Method Details
-
entityByJavaId
@Deprecated @NonNull CompletableFuture<@Nullable GeyserEntity> entityByJavaId(@org.checkerframework.checker.index.qual.NonNegative int javaId) Deprecated.usebyJavaId(int) -
byJavaId
Returns aGeyserEntityto e.g. make them play an emote.- Parameters:
javaId- the Java entity ID to look up- Returns:
- a
GeyserEntityif present in this connection's entity tracker
-
byUuid
Returns aGeyserEntityto e.g. update entity properties. -
byGeyserId
@Nullable GeyserEntity byGeyserId(@org.checkerframework.checker.index.qual.NonNegative long geyserId) Returns aGeyserEntitybased on a Geyser entity id -
lockMovement
(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 movementowner- 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.useGeyserConnection.requestOffhandSwap()instead -
showEmote
@Deprecated(since="2.9.3") void showEmote(@NonNull GeyserPlayerEntity emoter, @NonNull String emoteId) Deprecated. -
playerEntity
Deprecated.UseGeyserConnection.playerEntity()instead.
-
byJavaId(int)