API — skrót
Skrót MarketAPI, eventów i planowanego HTTP — Java działa, HTTP nie.
Kompatybilne z: GrzybcioRynek 1.0.3Minecraft 26.2Web 0.1.0
Na podstawie kodu GrzybcioRynek 1.0.3 i web 0.1.0.
Pełne strony: Przegląd, Java, Eventy, HTTP 🚧.
Java — metody
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()
Wyjątki:
text
IllegalStateException: GrzybcioRynek API nie jest gotowe
IllegalStateException: MarketAPI mutacje muszą być wywoływane z głównego wątku serweraEventy
| Event | Gettery | Uwagi |
|---|---|---|
ListingCreatedEvent | getListing() | po udanym sell |
ListingRemovedEvent | getListing(), getReason() | "removed" / "admin-removed" / "force-expire" |
TransactionCompletedEvent | getTransaction() | tylko COMPLETED |
Nieanulowalne. Wygaśnięcie timerem bez eventu.
Stany TX
CREATED LISTING_RESERVED MONEY_WITHDRAWN SELLER_PAID ITEM_DELIVERED COMPLETED ROLLED_BACK FAILED
🚧 HTTP — niezaimplementowane
Propozycja (brak kodu, brak auth, brak webhooków):
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/ używa mocka.