8 releases, newest first.
credits remove/give/set/reset) could stop reaching the proxy. They went through the first online player, and Paper drops a plugin message silently when that player is not listening on sncredits:main. Charges made by other plugins (paid rerolls, bets) then applied nothing.ShopItemSelectEvent (item click), ShopPurchaseConfirmEvent (Confirm button: nothing is charged when cancelled), CoinflipAcceptRequestEvent (accepting a coinflip from the menu).BalanceUpdateEvent (a new balance arrived) and ShopPurchaseCompleteEvent (the purchase was charged).BridgePriceModifier: change what an item costs for a player, for example ctx.percentOff(20) for a rank. The category menu and the confirm menu show it, and the proxy charges it.getShopPrice(player, category, item).ShopPriceModifier (the same idea for Velocity plugins) and getEffectivePrice(Player, ...). ShopPurchaseEvent.getPrice() now reports the price after modifiers.api-events.enabled (proxy config.yml) now also turns off the bridge events.com.sn.credits.api, API_VERSION 1.0.0: SnCreditsProvider.get() returns a read-only SnCreditsAPI (balances cached or async, leaderboard and rank, recent transactions, shops with effective prices, active discounts, open coinflips).CreditsPayEvent, ShopPurchaseEvent, CoinflipCreateEvent, CoinflipAcceptEvent. A cancelled action ends silently; the cancelling plugin informs the player.com.sn.credits.api.bridge, bridge API_VERSION 1.0.0: SnCreditsBridgeProvider.get() returns the balance and coinflip stats the proxy last pushed for online players.api-events.enabled in the proxy config.yml.old-config-v6-<time>.yml and writes a fresh default. Copy your settings back, above all database, before players join.plugins/.Sn-License/license.yml, exactly as on the backends. A refused proxy keeps the plugin messaging channel claimed (so client packets on it never reach the backends) and builds nothing else; a session refused later removes its command, listener and tasks and closes its database pool.plugins/.Sn-License/license.yml on the proxy before upgrading, or the proxy core stays inert there.discounts.yml on the proxy, edited by hand (/credits reload) or with /credits discount set <id> <target> <percent> [duration], /credits discount remove <id> and /credits discount list [server].
<server>, <server>:<category> or <server>:<category>:<item>; * as the server covers every server.30m, 2h, 3d, 1w, 1d12h); no duration = permanent. Expired discounts are removed and the menus refreshed automatically.{price} (after discount), {original_price}, {discount}, {discount_time}, {currency}.[discount] only show while discounted; [no-discount] only when not.gui.yml section discounts: name suffix, extra lore for every discounted item, category icon badge ("Up to -X% OFF"), permanent text, time format.sncredits.admin.discount (or sncredits.admin).gui.yml (v6) and messages.yml (v12) are regenerated on first start; your previous files are kept as old-gui-v5-*.yml / old-messages-v11-*.yml. Re-apply your customisations.shops/<server>.yml) are NOT touched. Existing lore keeps working: {price} now shows the discounted price, and the gui.yml extra lore marks discounted items.Payload may not be larger than 32767 bytes once its shop grew past about 32 KB, both on reload and when joining that backend right after it restarted. The proxy now sends messages that large in parts and the backend puts them back together; smaller messages are unchanged.Replace the jar on the proxy and on every backend, and restart the proxy: the fix lives there, so large shops keep disconnecting players until the proxy runs 1.14.2. A backend still on 1.14.1 ignores the split messages and keeps its previous shop until it is updated.
Full documentation lives in the Sn-Releases repo under docs/gitbook/sncredits/.
sncredits-vX.Y.Z on ValentinTarnovsky/Sn-Releases from now on.docs/gitbook/sncredits/ (installation, commands, permissions, configuration, placeholders, FAQ).Full documentation lives in the Sn-Releases repo under docs/gitbook/sncredits/.