Package dev.cwhead.GravesX.integration
Class ItemsAdder
java.lang.Object
com.ranull.graves.manager.EntityDataManager
dev.cwhead.GravesX.integration.ItemsAdder
ItemsAdder v4 runtime integration.
This class provides basic spawn/remove checks for ItemsAdder blocks and furniture
used by GravesX. The integration is event-gated via isReady() and should be
enabled when ItemsAdder finishes loading content (e.g. after /iareload or /iazip).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateBlock(org.bukkit.Location location, Grave grave) Places an ItemsAdder custom block for the given grave, if enabled in config.voidcreateFurniture(org.bukkit.Location location, Grave grave) Spawns an ItemsAdder furniture entity for the given grave, if enabled in config.booleanChecks whether the grave location currently contains an ItemsAdder custom block.booleanhasFurniture(Grave grave) Checks whether this grave currently has a valid ItemsAdder furniture entity attached.booleanisCustomBlock(org.bukkit.Location location) Checks whether the block at the location is an ItemsAdder custom block.booleanisReady()voidremoveBlock(org.bukkit.Location location) Removes an ItemsAdder custom block at the given location.voidremoveFurniture(EntityData entityData) Removes a single ItemsAdder furniture entity referenced by entity data.voidremoveFurniture(Grave grave) Removes all ItemsAdder furniture entities associated with a grave.voidremoveFurniture(Map<EntityData, org.bukkit.entity.Entity> entityDataMap) Removes ItemsAdder furniture entities for each entry in the provided map and deletes their associated entity data records.voidsetReady(boolean value) Sets the current readiness state.Methods inherited from class com.ranull.graves.manager.EntityDataManager
createEntityData, createEntityData, getEntityData, getEntityDataMap, getGrave, getGrave, getLoadedEntityDataList, removeEntityData, removeEntityData
-
Constructor Details
-
ItemsAdder
Creates the integration manager.- Parameters:
plugin- GravesX plugin instance
-
-
Method Details
-
isReady
public boolean isReady()- Returns:
trueif ItemsAdder content has been loaded and integration is enabled
-
setReady
public void setReady(boolean value) Sets the current readiness state.- Parameters:
value- new readiness state
-
createFurniture
Spawns an ItemsAdder furniture entity for the given grave, if enabled in config.- Parameters:
location- target locationgrave- grave context
-
removeFurniture
Removes all ItemsAdder furniture entities associated with a grave.- Parameters:
grave- grave context
-
removeFurniture
Removes a single ItemsAdder furniture entity referenced by entity data.- Parameters:
entityData- entity data entry
-
removeFurniture
Removes ItemsAdder furniture entities for each entry in the provided map and deletes their associated entity data records.- Parameters:
entityDataMap- entity data to entity map
-
createBlock
Places an ItemsAdder custom block for the given grave, if enabled in config.- Parameters:
location- target locationgrave- grave context
-
isCustomBlock
public boolean isCustomBlock(org.bukkit.Location location) Checks whether the block at the location is an ItemsAdder custom block.- Parameters:
location- location to test- Returns:
trueif the block is a custom block
-
removeBlock
public void removeBlock(org.bukkit.Location location) Removes an ItemsAdder custom block at the given location.- Parameters:
location- block location
-
hasFurniture
Checks whether this grave currently has a valid ItemsAdder furniture entity attached.This looks up the grave's stored entity data and verifies at least one linked entity is still alive/valid and recognized by ItemsAdder as furniture.
- Parameters:
grave- grave context- Returns:
trueif a linked ItemsAdder furniture entity is present
-
hasBlock
Checks whether the grave location currently contains an ItemsAdder custom block.- Parameters:
grave- grave context- Returns:
trueif an ItemsAdder custom block is present at the grave location
-