Skip to content

Plugin version 1.2.0 release - #3

Merged
Trilleo merged 10 commits into
TriBinary:masterfrom
Trilleo:master
Sep 20, 2026
Merged

Trilleo merged 10 commits into
TriBinary:masterfrom
Trilleo:master

Conversation

@Trilleo

@Trilleo Trilleo commented Sep 20, 2026

Copy link
Copy Markdown
Member

No description provided.

Trilleo and others added 10 commits September 20, 2026 15:49
A stock and a per-player limit counted purchases, so an entry selling
sixteen at a time with a limit of ten handed over a hundred and sixty
items, and one click spent one of the ten however much it moved.

Both now count items. A trade spends bundleSize * bundles of each, and
maxBuyable divides what is left by the bundle, because half a bundle is
not a purchase. Existing shops are converted as the file is read, so
every entry keeps trading exactly as it did.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
An entry could cap how much one player bought from it but not how much
they sold to it, so the only way to stop a shop buying a farm's whole
output was to take the sell side off entirely.

The two sides now have a limit each, set apart in the entry editor and
counted apart, so neither spends the other's allowance. Buying keeps the
counter key it has always had, so what players have already bought today
still counts.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Buying as many as you could always blamed the player's wallet when it
came back with nothing, which is wrong whenever the stock or their own
limit is what ran out — and now more often wrong, because a limit
counted in items can leave a remainder too small for one more bundle.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Prices, payouts, what is left and what a click does ran together in one
list, so reading a price meant picking it out of a set of instructions.
The lore is now built in blocks that ShopRender.sections spaces apart,
dropping the ones an entry has nothing for.

A price is red and a payout green wherever either appears, down to the
items each side asks for, so the two directions are told apart before
the number is read.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Giving a player items, asking whether they would fit, and adding lines to
an item's lore are not shop-specific. They move to InventoryUtil and
LoreUtil.withLore so anything else that hands over items or draws a menu
decides both the same way shops already do.

ShopInventory keeps what is genuinely its own: finding and taking goods
by MatchMode.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Shift-right-clicking another player, or /trade <player>, asks them to
trade; once they accept both get the same table, drawn for its own
viewer so your half is always on the left.

What a player puts up leaves their inventory and is held by the trade,
so the other side can trust what it is looking at. Money is named rather
than held, because a balance quietly missing from everything that reads
it would be the worse lie, so confirming re-checks it and the swap can
still refuse over it. Every change to either offer drops both
confirmations and locks them for a moment, so nothing can be swapped out
after the other player has agreed to it.

TradeManager.cancel is the only way a trade ends without the swap and is
idempotent, so escrow is handed back exactly once however many things
end the trade at the same instant. The quit path returns items inside
PlayerQuitEvent, which still runs before the server writes the player's
inventory.

Money settles as a single net payment, attributed as a player trade so
it lands in the ledger and the panel as a payment rather than an
anonymous Vault call.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Trilleo
Trilleo merged commit b60dc44 into TriBinary:master Sep 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant