SnDisplayShops v2.9.0
·
13 commits
to main
since this release
Changes
- New API event:
ShopMenuOpenEvent(cancellable). Fired when a player right-clicks a shop and
SnDisplayShops is about to open one of its menus. It carries the player, the shop and a
ShopMenuTypeofOWNERorBUYER- decided from who clicked, not from what the shop is. - Cancelling opens no menu, and does nothing else. The right-click stays claimed by this
plugin, so a shop built out of an enchanting table does not fall through to the vanilla screen
when a consumer takes the menu away, and the player is told nothing - whoever cancels owns what
they see next. A sellwand can finally be told about the click instead of racing the menu for it. - New config key
api-events.enabled(defaulttrue). With it off nothing is dispatched and
every cancellable event answers "not cancelled", so no other plugin can stop a menu from opening- which is how you find out whether one of them is the reason shops stopped responding to clicks.
The read half of the API is not affected and keeps working either way.
- which is how you find out whether one of them is the reason shops stopped responding to clicks.
- API version 1.1.0, now readable with
SnDisplayShopsAPI.getApiVersion(). The four existing
facade methods are untouched: this release only adds.
Notes for operators
Nothing to do. The new key is merged into your config.yml on boot with your values and comments
preserved, and a server with no plugin listening for the event behaves exactly as 2.8.0 did.
Installation
Download the JAR below and place in your plugins folder. Requires SnLib 1.28.0+.