Interface Entity

All Superinterfaces:
Faceted, Locatable
All Known Subinterfaces:
Player
All Known Implementing Classes:
AbstractPlayerActor, AsyncPlayer, BlockArrayClipboard.ClipboardEntity, HistoryExtent.TrackedEntity, IChunkExtent.IChunkEntity, LocationMaskedPlayerWrapper, PlayerProxy, SilentPlayerWrapper

public interface Entity extends Faceted, Locatable
A reference to an instance of an entity that exists in an Extent and thus would have position and similar details.

This object cannot be directly cloned because it represents a particular instance of an entity, but a BaseEntity can be created from this entity by calling getState().

  • Method Details

    • getState

      @Nullable BaseEntity getState()
      Get a copy of the entity's state.

      In some cases, this method may return null if a snapshot of the entity can't be created. It may not be possible, for example, to get a snapshot of a player.

      Returns:
      the entity's state or null if one cannot be created
    • getType

      default EntityType getType()
    • remove

      boolean remove()
      Remove this entity from it container.
      Returns:
      true if removal was successful