Interface Entity

All Superinterfaces:
Faceted, Locatable
All Known Subinterfaces:
Player
All Known Implementing Classes:
AbstractPlayerActor

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
    • remove

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