Overview of ChestShop's API
ChestShop is getting more and more event-driven. Here is a summary of all events currently existing:
Transaction Events
- PreTransactionEvent - It's a pre-transaction event. It can be used to cancel transactions, for example when the player hasn't got enough EXP.
- TransactionEvent - It's a post-transaction event, so it is fired after a transaction is made. It can be used, for example, for logging transactions.
Shop Events
- ShopCreatedEvent - Called after a shop is created. Can be used for logging/rewarding with EXP, etc.
Protection Events
- BuildPermissionEvent - checks if a shop can be made in its location. It's only blocking shop creation if all plugins that used it blocked the usage.
- ProtectionCheckEvent - checks if a block is protected and if the player from the event can access the block.
- ProtectBlockEvent - this event is called to tell protection plugins to protect the block. You should usually check if the block has been protected already before protecting it.
Miscellaneous Events
- ItemInfoEvent - can be used to add item information to the /iteminfo command, or for logging the usage of it. It's a post-action event.
(ChestShop's utility classes can be found in com.Acrobot.Breeze.Utils - it's a part of a framework for ChestShop-4)