Plugin architecture
How MarketPlace 1.0.3 wires hooks, storage, managers, and GUI — no HTTP layer.
Based on GrzybcioRynek 1.0.3 and web 0.1.0 source.
All working market logic lives in the Paper plugin. Startup class: com.example.marketplace.MarketPlace. The website is not part of this chain.
Startup (onEnable)
isSupportedServerVersion()— only token 26.2 (PaperServerBuildInfo, thenBukkitVersion/MinecraftVersion/getVersion()). Other version: logGrzybcioRynek działa TYLKO na Paper 26.2!anddisablePlugin.ConfigurationSerialization.registerClass(MarketListing.class).ConfigManager,GuiConfigManager,MessageManager.VaultHook. If Economy is not ready — retry after 20 ticks (1 s). Second fail:Vault nie znaleziono lub brak providera ekonomii! Wyłączanie pluginu.finishEnable().
finishEnable() order:
NexoHook → OraxenHook → CustomItemsHook
ExtendedDataStore → StorageManager
backupListings() + extendedDataStore.backup()
AntiAbuseManager → MailboxService → AlertService
StatsManager → ListingQueryService → ChatInputManager
MarketManager → GUIManager
MarketAPI.init(this)
commands + listeners + optional PlaceholderHook
removeExpiredListings() + processExpiryOutbox()
timer every 30 minutes (20L * 60 * 30)
onDisable: synchronous storageManager.save() and extendedDataStore.save().
Dependency graph
MarketPlace
├── ConfigManager / GuiConfigManager / MessageManager
├── VaultHook
├── NexoHook / OraxenHook / CustomItemsHook
├── ExtendedDataStore market-data.yml
├── StorageManager listings.yml
├── AntiAbuseManager
├── MailboxService / AlertService
├── StatsManager / ListingQueryService
├── ChatInputManager
├── MarketManager
├── GUIManager
└── MarketAPI
Commands: MarketCommand (/market, aliases ah, rynek), WystawCommand (/wystaw), AukcjeCommand (/aukcje, aliases rynek-gui, ah-gui). Listeners: GUIListener, PlayerJoinListener, ChatInputListener.
Layers
| Layer | Classes | Responsibility |
|---|---|---|
| Entry | MarketCommand, WystawCommand, AukcjeCommand, GUI | commands and clicks |
| Market | MarketManager | listing, buy, remove, refund, reservations |
| Queries | ListingQueryService + ItemSearchUtil | filter, sort, category |
| Listings | StorageManager | listings.yml, expiry outbox, pending queues |
| Extended data | ExtendedDataStore | history, mailbox, favorites, alerts, ratings |
| Economy | VaultHook | balance, withdraw, deposit by UUID, depositAccount |
| Custom items | CustomItemsHook | clone stack; rebuild only when AIR |
| GUI | InventoryGUI + impl/* | market screens |
Buy transaction (summary)
MarketManager.buyItem holds reservedListings and globalLock. States: CREATED → LISTING_RESERVED → MONEY_WITHDRAWN → SELLER_PAID → ITEM_DELIVERED → COMPLETED. On error: FAILED or rollback to ROLLED_BACK. Details: MarketManager.
Data on disk
plugins/GrzybcioRynek/
├── config.yml
├── gui.yml
├── listings.yml
├── listings.yml.bak
├── market-data.yml
└── market-data.yml.bak
Messages live in config.yml under messages.*. There is no separate messages.yml.
Outside the plugin
| Part | Role |
|---|---|
Strona/ | Next.js 16, mock 0.1.0 — no connection to the plugin |
Wiki/ | documentation |
HTTP API and webhooks do not exist. That is 🚧 Planned — see Planned HTTP API.