Package dev.cwhead.GravesX.api.provider
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 TypeMethodDescriptionid()
Stable, namespaced ID (e.g.boolean
Return true if this provider detects something placed for the grave.default int
order()
Lower runs earlier.void
Create/place any custom objects for this grave at the given location.void
Remove any custom objects that belong to this grave.boolean
removeEntityData
(EntityData data) Remove a specific CUSTOM entity data record, if supported.boolean
supports
(EntityData data) 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
Create/place any custom objects for this grave at the given location.- Parameters:
location
- the location of the gravegrave
- the grave to place over the default grave- Throws:
Exception
-
remove
Remove any custom objects that belong to this grave.- Parameters:
grave
- the grave to remove custom objects- Throws:
Exception
-
isPlaced
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
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
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
-