Interface TrackedEntity
public interface TrackedEntity
-
Method Summary
Modifier and TypeMethodDescriptionReturns the type of the stored entity.<T extends StorableObject>
@Nullable TReturns an object from the storage if present.booleanhas(Class<? extends StorableObject> objectClass) Checks if the storage contains an object of the given type.booleanReturns whether entity data has already been sent at least once for this entity.voidput(StorableObject object) Stores an object based on its class.<T extends StorableObject>
@Nullable TRemoves and returns an object from the storage if present.voidsentEntityData(boolean sentEntityData)
-
Method Details
-
entityType
EntityType entityType()Returns the type of the stored entity.- Returns:
- type of the entity
-
has
Checks if the storage contains an object of the given type.- Parameters:
objectClass- object class to check- Returns:
- whether an object of the given type is in the storage
-
get
Returns an object from the storage if present.- Type Parameters:
T- object type- Parameters:
objectClass- class of the object to get- Returns:
- object if present
-
remove
Removes and returns an object from the storage if present.- Type Parameters:
T- object type- Parameters:
objectClass- class of the object to remove- Returns:
- removed object if present
-
put
Stores an object based on its class.- Parameters:
object- object to store
-
hasSentEntityData
boolean hasSentEntityData()Returns whether entity data has already been sent at least once for this entity.- Returns:
- whether entity data has already been sent at least once for this entity
-
sentEntityData
void sentEntityData(boolean sentEntityData)
-