Package com.ranull.graves.manager
Class EntityDataManager
java.lang.Object
com.ranull.graves.manager.EntityDataManager
- Direct Known Subclasses:
CitizensNPC,EntityManager,FancyNPCs,FurnitureEngine,FurnitureLib,HologramManager,ItemsAdder,ItemStackManager,Nexo,Oraxen,PlayerNPC
Manages entity data and interactions within the Graves plugin.
-
Constructor Summary
ConstructorsConstructorDescriptionEntityDataManager(Graves plugin) Initializes the EntityDataManager with the specified plugin instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateEntityData(org.bukkit.entity.Entity entity, Grave grave, EntityData.Type type) Creates entity data for a specified entity and grave.voidcreateEntityData(org.bukkit.Location location, UUID entityUUID, UUID graveUUID, EntityData.Type type) Creates entity data for a specified location, entity UUID, grave UUID, and entity data type.getEntityData(org.bukkit.Location location, UUID uuid) Retrieves entity data for a specified location and entity UUID.Map<EntityData, org.bukkit.entity.Entity> getEntityDataMap(List<EntityData> entityDataList) Retrieves a map of entity data and their corresponding entities from a list of entity data.getGrave(org.bukkit.entity.Entity entity) Retrieves a grave for a specified entity.Retrieves a grave for a specified location and entity UUID.getLoadedEntityDataList(Grave grave) Retrieves a list of loaded entity data associated with a specified grave.voidremoveEntityData(EntityData entityData) Removes entity data for a specified entity data.voidremoveEntityData(List<EntityData> entityDataList) Removes a list of entity data.
-
Constructor Details
-
EntityDataManager
Initializes the EntityDataManager with the specified plugin instance.- Parameters:
plugin- the Graves plugin instance.
-
-
Method Details
-
createEntityData
Creates entity data for a specified entity and grave.- Parameters:
entity- the entity for which to create the data.grave- the grave associated with the entity.type- the type of entity data.
-
createEntityData
public void createEntityData(org.bukkit.Location location, UUID entityUUID, UUID graveUUID, EntityData.Type type) Creates entity data for a specified location, entity UUID, grave UUID, and entity data type.- Parameters:
location- the location of the entity.entityUUID- the UUID of the entity.graveUUID- the UUID of the grave.type- the type of entity data.
-
getEntityData
Retrieves entity data for a specified location and entity UUID.- Parameters:
location- the location of the entity.uuid- the UUID of the entity.- Returns:
- the entity data, or null if not found.
-
getGrave
Retrieves a grave for a specified location and entity UUID.- Parameters:
location- the location of the entity.uuid- the UUID of the entity.- Returns:
- the grave, or null if not found.
-
getGrave
Retrieves a grave for a specified entity.- Parameters:
entity- the entity for which to retrieve the grave.- Returns:
- the grave, or null if not found.
-
removeEntityData
Removes entity data for a specified entity data.- Parameters:
entityData- the entity data to remove.
-
getLoadedEntityDataList
Retrieves a list of loaded entity data associated with a specified grave.- Parameters:
grave- the grave for which to retrieve the loaded entity data.- Returns:
- the list of loaded entity data.
-
getEntityDataMap
Retrieves a map of entity data and their corresponding entities from a list of entity data.- Parameters:
entityDataList- the list of entity data to map.- Returns:
- the map of entity data and entities.
-
removeEntityData
Removes a list of entity data.- Parameters:
entityDataList- the list of entity data to remove.
-