Class GravesXAPI
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal AddonAPIAddon helpers.final GraveCreationAPIGrave creation operations.final GraveManagementAPIGrave management operations.final InventoryAPIInventory 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 SkinAPIProvides access to skin and texture utility methods.@NotNull UtilAPIProvides access to general-purpose utility methods.@NotNull Gravesplugin()Underlying Graves plugin (advanced usage).
-
Field Details
-
gravesCreate
Grave creation operations. -
gravesManage
Grave management operations. -
world
World/location helpers. -
inventory
Inventory helpers. -
skin
Skin/texture helpers. -
addon
Addon 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 configurationGraveManagementAPI– 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
-
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
Underlying Graves plugin (advanced usage).
-