Class GravesXAPI
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal AddonAPIAddon helpers.final GraveCreationAPIGrave creation operations.final GraveManagementAPIGrave management operations.final InventoryAPIInventory helpers.final PermissionAPIPermission helpers.final SkinAPISkin/texture helpers.final UtilAPIUtilities (permissions, XP, colors, files, YAML, paste, etc.).final LocationAPIWorld/location helpers. -
Constructor Summary
ConstructorsConstructorDescriptionGravesXAPI(@NotNull Graves plugin) Initializes the GravesXAPI facade with all modular API components. -
Method Summary
Modifier and TypeMethodDescription@NotNull AddonAPIProvides access to addon management utility methods.@NotNull GraveCreationAPIProvides access to grave creation utility methods.@NotNull GraveManagementAPIProvides access to grave management utility methods.@NotNull InventoryAPIProvides access to inventory utility methods.@NotNull LocationAPIProvides access to world and location utility methods.@NotNull PermissionAPIProvides access to permission checks viaPermissionAPI.@NotNull SkinAPIProvides access to skin and texture utility methods.@NotNull UtilAPIProvides access to general-purpose utility methods.@NotNull Gravesplugin()Returns the underlyingGravesplugin instance.
-
Field Details
-
gravesCreate
Grave creation operations. -
gravesManage
Grave management operations. -
world
World/location helpers. -
inventory
Inventory helpers. -
skin
Skin/texture helpers. -
addon
Addon helpers. -
permission
Permission helpers. -
util
Utilities (permissions, XP, colors, files, YAML, paste, etc.).
-
-
Constructor Details
-
GravesXAPI
Initializes the GravesXAPI facade with all modular API components.This constructor sets up and wires together the modular API classes:
LocationAPI– helpers for world and location utilitiesUtilAPI– general-purpose helpers (Base64, colors, XP, permissions, etc.)InventoryAPI– helpers for inventories, conversions, and equipping playersSkinAPI– helpers for skins, skulls, and player texturesAddonAPI– helpers for managing addons and their configurationPermissionAPI– helpers for permission checks via the active permissions providerGraveManagementAPI– operations for managing existing gravesGraveCreationAPI– operations for creating new graves
Each sub-API is created and linked to the given
Gravesplugin instance. Consumers should obtain this facade once (e.g., inonEnable()) and re-use it for accessing all modular APIs.- Parameters:
plugin- The activeGravesplugin instance used to initialize APIs
-
-
Method Details
-
getLocationAPI
Provides access to world and location utility methods.This includes helpers for converting between
Locationand string representations, rounding coordinates, working with chunks, and simplifyingBlockFacevalues.- Returns:
- the
LocationAPIinstance
-
getUtilAPI
Provides access to general-purpose utility methods.This includes helpers for Base64 encoding/decoding, colors, particles, permissions, experience calculations, materials, resources, files, YAML validation, reflection, and version updates.
- Returns:
- the
UtilAPIinstance
-
getInventoryAPI
Provides access to inventory utility methods.This includes helpers for converting inventories to and from strings, equipping players with armor or items, and determining valid inventory sizes.
- Returns:
- the
InventoryAPIinstance
-
getSkinAPI
Provides access to skin and texture utility methods.This includes helpers for retrieving and applying player skin textures, setting skull textures, and accessing
GameProfileinformation for players.- Returns:
- the
SkinAPIinstance
-
getAddonAPI
Provides access to addon management utility methods.This includes ensuring addon folders exist and exporting addon configuration files from packaged resources.
- Returns:
- the
AddonAPIinstance
-
getPermissionAPI
Provides access to permission checks viaPermissionAPI.- Returns:
- the
PermissionAPIinstance
-
getGravesManagementAPI
Provides access to grave management utility methods.This includes removing, breaking, looting, abandoning, and counting graves, as well as proximity checks.
- Returns:
- the
GraveManagementAPIinstance
-
getGravesCreationAPI
Provides access to grave creation utility methods.This includes creating new graves with various options such as equipment, items, experience, locations, protection, and custom causes.
- Returns:
- the
GraveCreationAPIinstance
-
plugin
Returns the underlyingGravesplugin instance.This is intended for advanced use-cases where direct access to internal managers or server state is necessary. Most consumers should prefer the modular sub-APIs exposed by this facade.
- Returns:
- the active Graves plugin instance
-