GrzybcioRynek

API — summary

Summary of MarketAPI, events, and planned HTTP — Java works, HTTP does not.

Compatible with: GrzybcioRynek 1.0.3Minecraft 26.2Web 0.1.0

Based on GrzybcioRynek 1.0.3 and web 0.1.0 source.

Full pages: Overview, Java, Events, HTTP 🚧.

Java — methods

isReady() getListings() getListing(int) getListingsBySeller(UUID) search(String) removeListing(int, Player) // MAIN THREAD sellItem(Player, ItemStack, double) // MAIN THREAD getCompletedTransactions() getTransaction(String) getActiveListingsCount() getMarketVolume() getCategories()

Exceptions:

text
IllegalStateException: GrzybcioRynek API nie jest gotowe
IllegalStateException: MarketAPI mutacje muszą być wywoływane z głównego wątku serwera

Events

EventGettersNotes
ListingCreatedEventgetListing()after successful sell
ListingRemovedEventgetListing(), getReason()"removed" / "admin-removed" / "force-expire"
TransactionCompletedEventgetTransaction()only COMPLETED

Non-cancellable. Timer expiry has no event.

TX states

CREATED LISTING_RESERVED MONEY_WITHDRAWN SELLER_PAID ITEM_DELIVERED COMPLETED ROLLED_BACK FAILED

🚧 HTTP — not implemented

Proposal (no code, no auth, no webhooks):

GET /api/listings GET /api/listings/:id GET /api/categories GET /api/players/:uuid GET /api/stats GET /api/history GET /api/price-history/:item

Strona/ uses a mock.