Interface GeyserEntity

All Known Subinterfaces:
GeyserPlayerEntity

public interface GeyserEntity
Represents a unique instance of an entity. Each GeyserConnection have their own sets of entities - no two instances will share the same GeyserEntity instance.
  • Method Details

    • javaId

      @org.checkerframework.checker.index.qual.NonNegative int javaId()
      Returns:
      the entity ID that the server has assigned to this entity.
    • updateProperty

      default <T> void updateProperty(@NonNull GeyserEntityProperty<T> property, @Nullable T value)
      Updates an entity property with a new value. If the new value is null, the property is reset to the default value.
      Type Parameters:
      T - the type of the value
      Parameters:
      property - a GeyserEntityProperty registered for this type in the GeyserDefineEntityPropertiesEvent
      value - the new property value
      Since:
      2.9.0
    • updatePropertiesBatched

      void updatePropertiesBatched(Consumer<BatchPropertyUpdater> consumer)
      Updates multiple properties with just one update packet.
      Since:
      2.9.0
      See Also: