The Market
The player-to-player cosmetics market - selling, buying, searching, payouts and the settings that control it.
The market lets players sell cosmetics they own to other players for your server currency. Open
it with /cosmetics market or the View Market button in /cosmetics.
The market needs an economy. Set Settings.Economy in config.yml to Vault, PlayerPoints or
RivalCredits and install that plugin. If the provider is missing, the console warns on startup
and buying is refused with MARKET-ECONOMY-UNAVAILABLE. All tuning lives under
config.yml → Market.
Selling
Section titled “Selling”- Open
/cosmeticsand click a cosmetic you own. - In the equip menu, click Sell Cosmetic.
- The menu closes and you are asked for a price in chat. Type a whole number, or
cancel(or an empty line) to stop.
A wrong price keeps the prompt open, so the player can simply type again. The price must be a whole
number above 0 and inside Min-Price / Max-Price.
Then the listing goes through when:
- the player still owns the cosmetic,
- they are under their listing limit (
Max-Listings, or their personal override from/cosmeticsadmin maxlistings), and - they can pay the
Listing-Fee, if one is set.
Listing is escrow: the cosmetic leaves the seller’s collection (and is unequipped) until it sells,
the seller removes the listing, or it expires. Once listed, the market opens for the seller
(MARKET-SELL-LISTED).
Buying
Section titled “Buying”Click a listing. The click is refused (with a flash icon and the DENY sound) when you already own
that cosmetic, have the same cosmetic listed yourself, or cannot afford it. With
Confirm-Purchase: true a confirm menu opens first; with false the purchase runs on the click.
The buyer pays the full price. The seller receives the price minus Sale-Tax percent:
- Seller online on this server: paid right away with
MARKET-SOLD. - Seller offline: the money is queued in the database and paid about 3 seconds after they next
join any server running the plugin, with
MARKET-PAYOUT-RECEIVED.
If two players buy the same listing at the same moment, only one gets it; the other is told
MARKET-ALREADY-SOLD and is never charged.
Removing and expiry
Section titled “Removing and expiry”- Remove a listing: click your own listing in the market. The cosmetic comes back to your
collection (
MARKET-LISTING-REMOVED). The listing fee is not refunded. - Expiry: with
Expiry-Daysabove 0, listings older than that are returned to the seller automatically (checked once a minute), withMARKET-LISTING-EXPIREDif they are online.0means listings never expire, and{expires}shows theCosmetic-Format.Neverlabel.
A listing that is in the middle of being bought cannot be removed or expire until the purchase finishes.
Browsing and search
Section titled “Browsing and search”- Filter cycles through All, Owned Cosmetics and every enabled type. “Owned Cosmetics” in the market shows listings of cosmetics you already own.
- Sort cycles Recent, Price Low to High, Price High to Low and Alphabetical. Left-click goes forward, right-click goes back.
- My Listings / View All Listings switches between your own listings and everyone’s.
- Search closes the menu and asks for a query in chat. The exact name of an online player shows that player’s listings; anything else shows listings whose cosmetic id contains the text. Changing the filter clears the search.
The lore on each listing depends on who is looking: Own-Listing, Already-Owned or Buyable from
Market-Listing-Lore. Open market menus
refresh by themselves when a listing is added, sold, removed or expires.
Admin controls
Section titled “Admin controls”/cosmeticsadmin maxlistings <player> <amount>- a personal listing limit.0means unlimited./cosmeticsadmin maxlistings <player> reset- back toMarket.Max-Listings./cosmeticsadmin giverefuses a cosmetic the player currently has listed, so ownership is never duplicated.
Safety
Section titled “Safety”Every purchase is written to a journal in the database before money moves. If the server crashes mid-purchase, the next start (and a check every minute) finishes or releases it: a charged purchase is completed and the seller paid, an unpaid one is released back to the market. The one case it cannot settle on its own, a crash during the economy call itself, is released and logged as SEVERE in the console with the buyer, amount and listing id so you can check it by hand.
On a network sharing one MySQL database the same rules hold across servers: a listing can only be bought, removed or expired once.
