Skip to content

SnDisplayShops v2.2.0

Latest

Choose a tag to compare

@ValentinTarnovsky ValentinTarnovsky released this 13 Aug 15:01
· 1 commit to main since this release

Changes

The owner menu is a SnLib menu now. SnLib 1.28.0 added menus that can receive an item
(input cells + an open player inventory + item offers), and this release moves the owner menu
onto it. The layout lives in guis/owner.yml, in the same dialect as the buyer menu; the old
owner-menu.yml at the plugin folder root is no longer read, and the plugin logs a pointed
warning if it finds one. "Your item is read, never consumed" is now enforced by SnLib itself.

What changed in how the menu behaves, each on purpose:

  • Shift-click ONLY deposits. A stack that does not match the traded item is refused with a
    message instead of silently replacing what the shop trades. Setting or changing the traded
    item is the center cell alone: click it holding the item on your cursor, or drag one onto it.
  • Pickup asks twice. The first click arms a red confirm cell; the second click within five
    seconds removes the shop. Left alone, it disarms itself.
  • Real pagination. A page indicator between the arrows, arrows that gray out at the ends,
    and no more click-past-the-end counter to click back down.
  • The menu is live. Stock, price, mode, currency and the title follow changes while the
    menu is open - trades update the grid under you.
  • Everything answers. Refused deposits, full inventories, empty cycles and dead cells all
    say why; withdraw-all now reports what you got, not only what stayed.

Upgrading

  • Requires SnLib 1.28.0 or newer on the server (API level 19). Update SnLib.jar first:
    https://github.com/ValentinTarnovsky/SnLib/releases/tag/v1.28.0
  • Owner menu customizations must be redone in guis/owner.yml (SnLib menu dialect). The old
    owner-menu.yml is ignored; delete it once restyled. To remove the withdraw button, delete
    the w from the layout - there is no toggle key any more.

Installation

Download the JAR below and place in your plugins folder. Requires SnLib.jar 1.28.0+.