GrzybcioRynek

listings.yml

Runtime listings YAML — listings, next-id, expiry-outbox, pending-returns, pending-sales.

Compatible with: GrzybcioRynek 1.0.3Minecraft 26.2Web 0.1.0

Based on GrzybcioRynek 1.0.3 and web 0.1.0 source.

File: plugins/GrzybcioRynek/listings.yml. Class: StorageManager. Created on first start. Do not edit while the plugin is enabledsave() will overwrite the file.

Backup: listings.yml.bak on enable/reload (backupListings, REPLACE_EXISTING).

Main keys

yaml
listings:
  - id: 1
    seller: "069a79f4-44e9-4726-a5be-fca90e38aaf5"
    sellerName: Gracz
    item: {==: org.bukkit.inventory.ItemStack, type: DIAMOND_SWORD, amount: 1}
    price: 1500.0
    timestamp: 1730000000000
    nexoId: custom_sword      # optional
    oraxenId: steel_blade     # optional
next-id: 2
KeyTypeRole
listingsmap list (MarketListing serializable)Active listings
next-idintNext ID; on load max(file, maxId+1)
expiry-outbox.<id>sectionExpired return journal
pending-returns.<uuid>item listOffline returns when mailbox disabled
pending-sales.<uuid>listSale notifications for offline seller
pending-sales.by-name.<nick>legacyCleared on join

Listing fields

FieldRequiredDescription
idyesUnique int
selleryesUUID string
sellerNamenoFallback "Nieznany"
itemyesBukkit ItemStack; AIR / amount≤0 = listing rejected on parse
priceyesdouble
timestampyesepoch ms — base for listing-expiry-days
nexoId / oraxenIdnoPack ID; missing = vanilla / stack only

expiry-outbox

Written before removing the listing from the list (crash-safe):

yaml
expiry-outbox:
  "42":
    seller: "069a79f4-44e9-4726-a5be-fca90e38aaf5"
    item: {==: org.bukkit.inventory.ItemStack, type: DIAMOND, amount: 16}
    price: 100.0
    reason: expired

processExpiryOutbox deletes the entry, then delivers the item. Empty / bad UUID = entry removed.

pending-returns

When mailbox.enabled: false and seller offline (or addPendingReturnPublic):

yaml
pending-returns:
  069a79f4-44e9-4726-a5be-fca90e38aaf5:
    - {==: org.bukkit.inventory.ItemStack, type: IRON_INGOT, amount: 32}

On join the plugin tries to put the item into inventory.

pending-sales

Sale while seller offline — notification on join (buy.seller-notified):

yaml
pending-sales:
  <seller-uuid>:
    - buyer: NickKupującego
      item: "DIAMOND_SWORD"
      price: 1500.0

pending-sales.by-name.<nick> is the old format; on join it is read and cleared.

Save

save() synchronously: listings + next-id (+ other sections in the same dataConfig). No atomic temp save (that is for market-data.yml).