🪛 Developer API
Global Events
ShopTransactionEvent
Called when player purchases or sells an item in a shop.
The event is not cancellable, however you can cancel the transaction itself (make sure to send custom error message):
To determine which shop is used in transaction, you can use instanceof
:
Virtual Shop
Get module instance:
Get shop by ID:
Get product by ItemStack:
Get the most profitable product for purchase for the given ItemStack:
Get the most profitable product for selling for the given ItemStack:
This method does not includes products that can not be bought or sold by given player.
Chest Shop
ChestShopCreateEvent
Called when player is about to create a new chest shop. Cancellable.
ChestShopRemoveEvent
Called when player is about to remove a chest shop. Cancellable.
Get module instance:
Get all shops:
Get shops created by a player:
Get shop by block or location:
Last updated