Package com.ranull.graves.integration
Class ItemsAdder
java.lang.Object
com.ranull.graves.manager.EntityDataManager
com.ranull.graves.integration.ItemsAdder
Integration with the ItemsAdder plugin for handling custom furniture and blocks.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionItemsAdder(Graves plugin, org.bukkit.plugin.Plugin itemsAdderPlugin) Constructs an ItemsAdder instance and saves data related to ItemsAdder. -
Method Summary
Modifier and TypeMethodDescriptionprivate intcompareVersions(String v1, String v2) Compares versions for ItemsAdder integration.voidcreateBlock(org.bukkit.Location location, Grave grave) Creates and places a custom block at a specified location.private dev.lone.itemsadder.api.CustomBlockcreateCustomBlock(String name, org.bukkit.Location location) Creates a custom block instance with a specified name and location.private dev.lone.itemsadder.api.CustomFurniturecreateCustomFurniture(String name, org.bukkit.Location location) Creates a custom furniture instance with a specified name and location.voidcreateFurniture(org.bukkit.Location location, Grave grave) Creates and places custom furniture at a specified location.private voidDeletes 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).booleanisCustomBlock(org.bukkit.Location location) Checks if a custom block exists at a specified location.voidremoveBlock(org.bukkit.Location location) Removes a custom block at a specified location.voidremoveFurniture(EntityData entityData) Removes custom furniture associated with a specific entity data.voidremoveFurniture(Grave grave) Removes all custom furniture associated with a specific grave.voidremoveFurniture(Map<EntityData, org.bukkit.entity.Entity> entityDataMap) Removes custom furniture based on a map of entity data and entities.voidsaveData()Copies resource files needed for ItemsAdder integration.Methods inherited from class com.ranull.graves.manager.EntityDataManager
createEntityData, createEntityData, getEntityData, getEntityDataMap, getGrave, getGrave, getLoadedEntityDataList, removeEntityData, removeEntityData
-
Field Details
-
plugin
-
itemsAdderPlugin
private final org.bukkit.plugin.Plugin itemsAdderPlugin
-
-
Constructor Details
-
ItemsAdder
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
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
Compares versions for ItemsAdder integration. -
createFurniture
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
Removes all custom furniture associated with a specific grave.- Parameters:
grave- The grave object whose furniture is to be removed.
-
removeFurniture
Removes custom furniture associated with a specific entity data.- Parameters:
entityData- The entity data for the furniture to be removed.
-
removeFurniture
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
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.
-