Class ItemsAdder

java.lang.Object
com.ranull.graves.manager.EntityDataManager
dev.cwhead.GravesX.integration.ItemsAdder

public final class ItemsAdder extends EntityDataManager
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 Details

    • ItemsAdder

      public ItemsAdder(Graves plugin)
      Creates the integration manager.
      Parameters:
      plugin - GravesX plugin instance
  • Method Details

    • isReady

      public boolean isReady()
      Returns:
      true if 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

      public void createFurniture(org.bukkit.Location location, Grave grave)
      Spawns an ItemsAdder furniture entity for the given grave, if enabled in config.
      Parameters:
      location - target location
      grave - grave context
    • removeFurniture

      public void removeFurniture(Grave grave)
      Removes all ItemsAdder furniture entities associated with a grave.
      Parameters:
      grave - grave context
    • removeFurniture

      public void removeFurniture(EntityData entityData)
      Removes a single ItemsAdder furniture entity referenced by entity data.
      Parameters:
      entityData - entity data entry
    • removeFurniture

      public void removeFurniture(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.
      Parameters:
      entityDataMap - entity data to entity map
    • createBlock

      public void createBlock(org.bukkit.Location location, Grave grave)
      Places an ItemsAdder custom block for the given grave, if enabled in config.
      Parameters:
      location - target location
      grave - 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:
      true if 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

      public boolean hasFurniture(Grave grave)
      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:
      true if a linked ItemsAdder furniture entity is present
    • hasBlock

      public boolean hasBlock(Grave grave)
      Checks whether the grave location currently contains an ItemsAdder custom block.
      Parameters:
      grave - grave context
      Returns:
      true if an ItemsAdder custom block is present at the grave location