Interface IEntity

All Known Subinterfaces:
EvolutionEntity
All Known Implementing Classes:
Entity

public interface IEntity
Interface representing an entity in the Prometheus system.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the current UUID of the entity.
    Gets the entity group to which this entity belongs.
    Gets the name of the entity.
    Gets the unique identifier for the entity registry.
    boolean
    Checks if the entity belongs to a specific group.
    boolean
    hasGroups(String[] groups)
    Checks if the entity belongs to any of the specified groups.
    boolean
    Checks if the entity is alive.
    default void
    Kills the entity, marking it as dead and performing any necessary cleanup operations.
    void
    setAlive(boolean alive)
    Sets the alive status of the entity.
    void
    setRegistryMeta(String registryId, String[] groups)
    Sets the metadata for the entity registry based on the provided registry ID.
  • Method Details

    • getRegistryId

      String getRegistryId()
      Gets the unique identifier for the entity registry.
      Returns:
      A string representing the unique identifier for the entity registry.
    • getName

      String getName()
      Gets the name of the entity.
      Returns:
      A string representing the name of the entity.
    • setRegistryMeta

      void setRegistryMeta(String registryId, String[] groups)
      Sets the metadata for the entity registry based on the provided registry ID.
      Parameters:
      registryId - A string representing the unique identifier for the entity registry.
      groups - An array of strings representing the groups to which the entity belongs.
    • isAlive

      boolean isAlive()
      Checks if the entity is alive.
      Returns:
      true if the entity is alive, false otherwise.
    • setAlive

      void setAlive(boolean alive)
      Sets the alive status of the entity.
      Parameters:
      alive - A boolean value indicating whether the entity is alive (true) or dead (false).
    • currentUUID

      UUID currentUUID()
      Gets the current UUID of the entity.
      Returns:
      A UUID representing the current unique identifier of the entity.
    • kill

      default void kill()
      Kills the entity, marking it as dead and performing any necessary cleanup operations.
    • entityGroup

      String[] entityGroup()
      Gets the entity group to which this entity belongs.
      Returns:
      An array of strings representing the entity group(s) to which this entity belongs.
    • hasGroup

      boolean hasGroup(String group)
      Checks if the entity belongs to a specific group.
      Parameters:
      group - A string representing the group to check for membership.
      Returns:
      true if the entity belongs to the specified group, false otherwise.
    • hasGroups

      boolean hasGroups(String[] groups)
      Checks if the entity belongs to any of the specified groups.
      Parameters:
      groups - An array of strings representing the groups to check for membership.
      Returns:
      true if the entity belongs to any of the specified groups, false otherwise.