Interface GraveProvider


public interface GraveProvider
Custom grave provider discovered via Bukkit Services. Modules implement this and register it with ModuleContext.registerService(...).
  • Method Summary

    Modifier and Type
    Method
    Description
    id()
    Stable, namespaced ID (e.g.
    boolean
    isPlaced(Grave grave)
    Return true if this provider detects something placed for the grave.
    default int
    Lower runs earlier.
    void
    place(org.bukkit.Location location, Grave grave)
    Create/place any custom objects for this grave at the given location.
    void
    remove(Grave grave)
    Remove any custom objects that belong to this grave.
    boolean
    Remove a specific CUSTOM entity data record, if supported.
    boolean
    Return true if this provider recognizes the given CUSTOM entity data.
  • Method Details

    • id

      String id()
      Stable, namespaced ID (e.g. "myaddon:furniture"). Used in logs/configs.
      Returns:
      the Grave Provider Namespace ID
    • order

      default int order()
      Lower runs earlier. Use to order multiple providers (default 0).
      Returns:
      the order the grave spawns (lowest has higher priority)
    • place

      void place(org.bukkit.Location location, Grave grave) throws Exception
      Create/place any custom objects for this grave at the given location.
      Parameters:
      location - the location of the grave
      grave - the grave to place over the default grave
      Throws:
      Exception
    • remove

      void remove(Grave grave) throws Exception
      Remove any custom objects that belong to this grave.
      Parameters:
      grave - the grave to remove custom objects
      Throws:
      Exception
    • isPlaced

      boolean isPlaced(Grave grave)
      Return true if this provider detects something placed for the grave.
      Parameters:
      grave - the grave to check
      Returns:
      true if the grave is placed. False otherwise.
    • supports

      boolean supports(EntityData data)
      Return true if this provider recognizes the given CUSTOM entity data. (E.g. check a metadata field or namespaced tag your module wrote.)
      Parameters:
      data - the Custom Entity Data
      Returns:
      if it recognizes the given Custom entity data.
    • removeEntityData

      boolean removeEntityData(EntityData data) throws Exception
      Remove a specific CUSTOM entity data record, if supported.
      Parameters:
      data - the entity data record
      Returns:
      true if handled/removed, false to let others try.
      Throws:
      Exception