Class Nexo


public class Nexo extends EntityDataManager
  • Constructor Details

    • Nexo

      public Nexo(Graves plugin, org.bukkit.plugin.Plugin nexoPlugin)
      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.
    • 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

      public void createFurniture(org.bukkit.Location location, Grave grave)
      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

      public void removeFurniture(Grave grave)
      Removes all Nexo furniture associated with a specified grave.
      Parameters:
      grave - The grave whose associated furniture will be removed.
    • removeFurniture

      public void removeFurniture(EntityData entityData)
      Removes a specific Nexo furniture entity based on entity data.
      Parameters:
      entityData - The entity data of the furniture to be removed.
    • removeFurniture

      public void removeFurniture(Map<EntityData,org.bukkit.entity.Entity> entityDataMap)
      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

      public void createBlock(org.bukkit.Location location, Grave grave)
      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

      public com.nexomc.nexo.mechanics.furniture.FurnitureMechanic getFurnitureMechanic(String string)
      Retrieves a FurnitureMechanic by name from the Nexo plugin.
      Parameters:
      string - The name of the furniture mechanic.
      Returns:
      The FurnitureMechanic if found, otherwise null.
    • hasFurniture

      public boolean hasFurniture(Grave grave)
      True if a Nexo furniture entity for this grave is currently spawned.
      Parameters:
      grave - The grave to check.
      Returns:
      True if at least one valid Nexo furniture entity mapped to this grave exists.
    • hasBlock

      public boolean hasBlock(Grave grave)
      True if a Nexo custom block exists at the grave location.
      Parameters:
      grave - The grave to check.
      Returns:
      True if a custom Nexo block is present where the grave is placed.