Price Alerts
Price alerts — match new listing (price ≤ max, ItemSearchUtil, not own), online only, no auto-remove.
Based on GrzybcioRynek 1.0.3 and web 0.1.0 source.
Alert: phrase + maximum price. Service: AlertService.checkListing after listing creation. Data: market-data.yml → alerts.<uuid>.
market.alerts from plugin.yml is not checked in Java.
Configuration
price-alerts:
enabled: true
max-per-player: 10enabled: false → /market alerts and browse button (slot 50) give alerts.disabled. checkListing then does nothing.
Limit on addAlert — exceeded: alerts.limit ({limit}).
Creating
/market alerts add diamentowy miecz 5000
Last argument = max price. Everything between add and the price = phrase (spaces allowed).
Success: alerts.created ({query}, {price}). Clicking an existing alert in the GUI = remove (alerts.removed).
When it fires
After sellItem, on a new listing, for each alert:
listing.price <= alert.maxPriceItemSearchUtil.matches(listing, alert.query)- seller ≠ alert owner (own listings do not ping)
- alert owner is online
Message: alerts.triggered ({item}, {price}, {max}).
The alert is not removed after firing. An offline player does not get a backlog notification on join.
GUI
54 slots. Add 49. Pagination 48/50, page on 53, back 45. Empty: gui.alerts.empty.
What is missing
- Alerts on price drops of existing listings (new listings only).
- Queuing for offline players.
- Auto-remove after trigger.