Package com.ranull.graves.integration
Class Nexo
java.lang.Object
com.ranull.graves.manager.EntityDataManager
com.ranull.graves.integration.Nexo
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final EntityDamageListener
private final HangingBreakListener
private final org.bukkit.plugin.Plugin
private final PlayerInteractEntityListener
private final Graves
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
copyResource
(String resourcePath, File outFile) Copies resource from jar to the nexo folder.void
createBlock
(org.bukkit.Location location, Grave grave) Creates and places a Nexo block at a specified location.void
createFurniture
(org.bukkit.Location location, Grave grave) Creates and places Nexo furniture at a specified location.com.nexomc.nexo.mechanics.furniture.FurnitureMechanic
getFurnitureMechanic
(String string) Retrieves a FurnitureMechanic by name from the Nexo plugin.com.nexomc.nexo.mechanics.custom_block.noteblock.NoteBlockMechanic
getNoteBlockMechanic
(String string) Retrieves a NoteBlockMechanic by name from the Nexo plugin.boolean
isCustomBlock
(org.bukkit.Location location) Checks if a block at a specified location is a custom Nexo block.void
Registers event listeners for Nexo-related events.void
removeBlock
(org.bukkit.Location location) Removes a block at a specified location.void
removeFurniture
(EntityData entityData) Removes a specific Nexo furniture entity based on entity data.void
removeFurniture
(Grave grave) Removes all Nexo furniture associated with a specified grave.void
removeFurniture
(Map<EntityData, org.bukkit.entity.Entity> entityDataMap) Removes Nexo furniture entities based on a map of entity data to entities.void
saveData()
Saves the data related to the Nexo plugin.void
Unregisters event listeners to prevent memory leaks or other issues.Methods inherited from class com.ranull.graves.manager.EntityDataManager
createEntityData, createEntityData, getEntityData, getEntityDataMap, getGrave, getGrave, getLoadedEntityDataList, removeEntityData, removeEntityData
-
Field Details
-
plugin
-
nexoPlugin
private final org.bukkit.plugin.Plugin nexoPlugin -
playerInteractEntityListener
-
entityDamageListener
-
hangingBreakListener
-
-
Constructor Details
-
Nexo
Initializes the EntityDataManager with the specified plugin instance.- Parameters:
plugin
- the Graves plugin instance.
-
-
Method Details
-
saveData
public void saveData()Saves the data related to the Nexo plugin. -
copyResource
Copies resource from jar to the nexo folder. -
registerListeners
public void registerListeners()Registers event listeners for Nexo-related events. -
unregisterListeners
public void unregisterListeners()Unregisters event listeners to prevent memory leaks or other issues. -
createFurniture
Creates and places Nexo furniture at a specified location.- Parameters:
location
- The location where the furniture will be placed.grave
- The grave related to the furniture.
-
removeFurniture
Removes all Nexo furniture associated with a specified grave.- Parameters:
grave
- The grave whose associated furniture will be removed.
-
removeFurniture
Removes a specific Nexo furniture entity based on entity data.- Parameters:
entityData
- The entity data of the furniture to be removed.
-
removeFurniture
Removes Nexo furniture entities based on a map of entity data to entities.- Parameters:
entityDataMap
- A map of entity data to entities to be removed.
-
createBlock
Creates and places a Nexo block at a specified location.- Parameters:
location
- The location where the block will be placed.grave
- The grave related to the block.
-
removeBlock
public void removeBlock(org.bukkit.Location location) Removes a block at a specified location.- Parameters:
location
- The location of the block to be removed.
-
isCustomBlock
public boolean isCustomBlock(org.bukkit.Location location) Checks if a block at a specified location is a custom Nexo block.- Parameters:
location
- The location of the block to check.- Returns:
- True if the block is a custom Nexo block, false otherwise.
-
getFurnitureMechanic
Retrieves a FurnitureMechanic by name from the Nexo plugin.- Parameters:
string
- The name of the furniture mechanic.- Returns:
- The FurnitureMechanic if found, otherwise null.
-
getNoteBlockMechanic
public com.nexomc.nexo.mechanics.custom_block.noteblock.NoteBlockMechanic getNoteBlockMechanic(String string) Retrieves a NoteBlockMechanic by name from the Nexo plugin.- Parameters:
string
- The name of the note block mechanic.- Returns:
- The NoteBlockMechanic if found, otherwise null.
-