EzShopsAPI
Package: com.skyblockexp.ezshops.api
Overview
EzShopsAPI is the recommended unified entry point to access EzShops services (shop pricing, templates, stock). It exposes helper getters and lifecycle management for integrations.
Constructors
private EzShopsAPI(EzShopsPlugin plugin)- initialized by the plugin; external code should usegetInstance().
Key methods
static void initialize(EzShopsPlugin plugin)- called by the plugin during enablestatic EzShopsAPI getInstance()- returns the singleton; throwsIllegalStateExceptionif not initializedShopPriceService getShopAPI()- may returnnullif shop pricing is disabledShopTemplateService getTemplateAPI()- may returnnullif template support disabledStockAPI getStockAPI()- may returnnullwhen stock feature disabledboolean isStockAPIAvailable()- quick availability checkEzShopsPlugin getPlugin()- access plugin instancestatic void shutdown()- clear singleton on plugin disable
Usage (short)
EzShopsAPI api = EzShopsAPI.getInstance();
ShopPriceService shop = api.getShopAPI();
if (api.isStockAPIAvailable()) {
StockAPI stock = api.getStockAPI();
}