Class ItemsAdder

java.lang.Object
com.ranull.graves.manager.EntityDataManager
com.ranull.graves.integration.ItemsAdder

public final class ItemsAdder extends EntityDataManager
Integration with the ItemsAdder plugin for handling custom furniture and blocks.
  • Field Details

    • plugin

      private final Graves plugin
    • itemsAdderPlugin

      private final org.bukkit.plugin.Plugin itemsAdderPlugin
  • Constructor Details

    • ItemsAdder

      public ItemsAdder(Graves plugin, org.bukkit.plugin.Plugin itemsAdderPlugin)
      Constructs an ItemsAdder instance and saves data related to ItemsAdder.
      Parameters:
      plugin - The Graves plugin instance.
      itemsAdderPlugin - The ItemsAdder plugin instance.
  • Method Details

    • saveData

      public void saveData()
      Copies resource files needed for ItemsAdder integration.
    • deleteOldItemsAdderData

      private void deleteOldItemsAdderData(String path)
      Deletes older ItemsAdder Data to give room for new data for newer versions without affecting other files (as some models may need them for backwards compatibility).
    • compareVersions

      private int compareVersions(String v1, String v2)
      Compares versions for ItemsAdder integration.
    • createFurniture

      public void createFurniture(org.bukkit.Location location, Grave grave)
      Creates and places custom furniture at a specified location.
      Parameters:
      location - The location to place the furniture.
      grave - The grave object associated with the furniture.
    • removeFurniture

      public void removeFurniture(Grave grave)
      Removes all custom furniture associated with a specific grave.
      Parameters:
      grave - The grave object whose furniture is to be removed.
    • removeFurniture

      public void removeFurniture(EntityData entityData)
      Removes custom furniture associated with a specific entity data.
      Parameters:
      entityData - The entity data for the furniture to be removed.
    • removeFurniture

      public void removeFurniture(Map<EntityData,org.bukkit.entity.Entity> entityDataMap)
      Removes custom furniture based on a map of entity data and entities.
      Parameters:
      entityDataMap - A map of entity data and corresponding entities to be removed.
    • createBlock

      public void createBlock(org.bukkit.Location location, Grave grave)
      Creates and places a custom block at a specified location.
      Parameters:
      location - The location to place the block.
      grave - The grave object associated with the block.
    • isCustomBlock

      public boolean isCustomBlock(org.bukkit.Location location)
      Checks if a custom block exists at a specified location.
      Parameters:
      location - The location to check.
      Returns:
      True if a custom block exists at the location, false otherwise.
    • removeBlock

      public void removeBlock(org.bukkit.Location location)
      Removes a custom block at a specified location.
      Parameters:
      location - The location of the block to be removed.
    • createCustomFurniture

      private dev.lone.itemsadder.api.CustomFurniture createCustomFurniture(String name, org.bukkit.Location location)
      Creates a custom furniture instance with a specified name and location.
      Parameters:
      name - The name of the custom furniture.
      location - The location where the furniture should be placed.
      Returns:
      The created CustomFurniture instance, or null if creation failed.
    • createCustomBlock

      private dev.lone.itemsadder.api.CustomBlock createCustomBlock(String name, org.bukkit.Location location)
      Creates a custom block instance with a specified name and location.
      Parameters:
      name - The name of the custom block.
      location - The location where the block should be placed.
      Returns:
      The created CustomBlock instance, or null if creation failed.