Class Nexo


public class Nexo extends EntityDataManager
  • Field Details

  • 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.
    • copyResource

      private void copyResource(String resourcePath, File outFile)
      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

      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.
    • 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.