Package com.ranull.graves.integration
Class FurnitureLib
java.lang.Object
com.ranull.graves.manager.EntityDataManager
com.ranull.graves.integration.FurnitureLib
Manages integration with the FurnitureLib plugin for creating, removing, and interacting with furniture.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
Inner class to handle FurnitureLib plugin functionalities and project registration. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
canBuild
(org.bukkit.Location location, org.bukkit.entity.Player player) Checks if a player can build at a specific location using FurnitureLib's protection.void
createFurniture
(org.bukkit.Location location, Grave grave) Creates and places furniture at the specified location.boolean
hasFurniture
(Grave grave) True if FurnitureLib furniture occupies the grave's location.void
Registers FurnitureLib event listeners.void
removeFurniture
(EntityData entityData) Removes specific furniture entity data.void
removeFurniture
(Grave grave) Removes furniture associated with the specified grave.void
removeFurniture
(List<EntityData> entityDataList) Removes multiple pieces of furniture based on a list of entity data.void
Unregisters FurnitureLib event listeners.Methods inherited from class com.ranull.graves.manager.EntityDataManager
createEntityData, createEntityData, getEntityData, getEntityDataMap, getGrave, getGrave, getLoadedEntityDataList, removeEntityData, removeEntityData
-
Constructor Details
-
FurnitureLib
Constructs a FurnitureLib instance.- Parameters:
plugin
- The main plugin instance.
-
-
Method Details
-
registerListeners
public void registerListeners()Registers FurnitureLib event listeners. -
unregisterListeners
public void unregisterListeners()Unregisters FurnitureLib event listeners. -
canBuild
public boolean canBuild(org.bukkit.Location location, org.bukkit.entity.Player player) Checks if a player can build at a specific location using FurnitureLib's protection.- Parameters:
location
- The location to check.player
- The player to check permissions for.- Returns:
- True if the player can build, false otherwise.
-
createFurniture
Creates and places furniture at the specified location.- Parameters:
location
- The location where the furniture should be placed.grave
- The grave associated with the furniture.
-
removeFurniture
Removes furniture associated with the specified grave.- Parameters:
grave
- The grave for which to remove furniture.
-
removeFurniture
Removes specific furniture entity data.- Parameters:
entityData
- The entity data of the furniture to remove.
-
removeFurniture
Removes multiple pieces of furniture based on a list of entity data.- Parameters:
entityDataList
- A list of entity data for the furniture to remove.
-
hasFurniture
True if FurnitureLib furniture occupies the grave's location.- Parameters:
grave
- The grave to check.- Returns:
- True if any FurnitureLib ObjectID covers the grave's block position.
-