Trade notifications, out-of-stock notifications
lukeeexd opened this issue ยท 4 comments
So all my players want a message sent to them when someone buys something from their shop. So if they're online it will say x person bought x amount of x item. And then when stock is run out and someone tries to buy if it can notifiy too
Also is it possible to add a notification list for when people are purchased from while they are offline? Similar to how Chest Shop Notifier works?
#693 also asks for notifications to be logged into the console, which fits this as well.
Also requested: Trade notifications for all shops for moderators (players with a special permission node). There might even be servers which want to post these trade notifications to all online players.
Edit: Also probably need to merge notifications for the same trade which happen in quick succession (eg. caused by shift trading, or click spamming), to not spam players with notifications too easily. Depending on how big of a problem this is, it might also make sense to add some sort of rate limiting, or if there are an excess amount of notifications queued replace them with a generic 'And x more trades ...' message. And/Or a command to toggle notifications (for own / for all shops) in-game might be useful. Persisting this setting would require to store per-player data though.
Added in v2.13.0:
- Notifications for players with specific permissions.
- Notifications for shop owners.
- Merging of equal trades over a certain duration.
- Shop owners can disable the trade notifications for individual shops.
- Added a command for players to toggle trade notifications in-game.
However, there are still a few remaining things to look into (I created follow-up ticket for those):
- Notifications about the shop being out of stock: #746
- Notifications about the chest being full: #746
- Better protection against players causing notification spam: #748
- Storing notifications while the player is offline: #749
- Remembering the selected notification state of players (this is currently reset when the player reconnects the server): #747
- Logging trades to the console: #750