premium banner
Physical coin economy with pouch to store them and player/admin vendors/stores/shops.

Description

Check out more of the [Physical Economy Series]:


Coins & Markets

A physical coin economy for Hytale: Copper / Silver / Gold / Platinum, a Coin Pouch to keep everything tidy, and Player/Admin Vendors for real server markets.

  • Build real shops in towns (SMP/RP friendly)
  • Buy & sell instantly with fixed-price listings
  • Keep coins compact with the Coin Pouch (with optional auto-pickup)

✨ Features

πŸͺ™ Physical currency

  • 4 denominations: Copper / Silver / Gold / Platinum
  • Default exchange: 1 Silver = 100 Copper, 1 Gold = 100 Silver, 1 Platinum = 100 Gold (configurable)

πŸŽ’ Coin Pouch

  • Store coins in a dedicated UI
  • Optional auto-pickup → auto-deposit into pouch (enabled by default)
  • Optional use-first-for-payments → take coins from this bag first when you pay for something 

🧱 Vendors

  • Easy to use blocks to sell everything you wish

 

Player Vendor:

 

  • 16 listings per vendor (default)
  • Owner-only management, buyers only see the shop page
  • Sales go into a secure Earnings Vault _(stored as “copper value”

           

 

 

Admin Vendor:

 

  • Optional infinite stock (enabled by default)
  • Great for server shops / NPC markets / spawn hubs

 

 

Command Offers

 

When a player buys a specific Admin Vendor offer, the server can automatically run one or more commands as a reward/action.

Practical examples (write 1 command per line):

  • console: broadcast {player} purchased VIP!
  • console: give {player} Coin_Gold 3
  • console: lp user {player} parent add vip 30d
  • player: give {player} Coin_Silver

Rules / tips:

  • One command per line (add multiple lines to chain rewards).
  • No dangerous commands (avoid OP/perm escalation unless you really mean it).
  • Test first with a safe offer on a test vendor before using it for real rewards.
  • No / before the actual command.


πŸš€ Quick Start (for players)

  1. Get a Coin Pouch and keep your coins there.
  2. Place a Vendor in your shop.
  3. As owner: open vendor management → create listings → stock items.
  4. Buyers click to purchase, you collect earnings from the Vault.

Tip: coins are physical items — your server decides how to distribute them (loot, quests, rewards, trading, admin tools, etc.).


πŸ›‘οΈ Protection & Server-Safety

Coins & Markets protects Vendors and Admin Vendors with a layered system (Owner → server rules → permissions) designed to prevent grief and abuse, even on public servers.

βœ… Default behavior (simple setup / no LuckPerms)

  • Owner-only management: by default only the owner can:
    • edit offers (edit)
    • restock listings (stock)
    • withdraw from Vault/earnings (withdraw)
    • break the vendor (break)
  • No permission plugin required: the mod works fine without LuckPerms (or any external provider).
  • Staff cleanup: by default OPs can break any Player Vendor (useful to remove abandoned shops / grief).
  • Creative “break-any”: disabled by default (enable it in the config if you want it).
  • Stricter Admin Vendors: by default creation and management are OP-only, and OP/Creative “break-any” rules do not apply to Admin Vendors (unless enabled by config).

🧠 How permissions are evaluated (check order)

When a player attempts an action, the mod evaluates it roughly in this order:

  1. Hard blocks for Admin Vendors (if enabled in config)
    If an action is marked OP-only and OpOnlyOverridesPermissions=true, then:
    non-OP = denied, even if they have LuckPerms permissions.
  2. Bypass rules (only if enabled)
    Some Admin Vendor actions can be bypassed via:
    • Creative (if AllowCreative...=true)
    • LuckPerms bypass nodes (if AllowPermissionBypass=true and LuckPerms is enabled)
  3. Fallback “Owner rules” (simple mode)
    Used when LuckPerms is not active or when you chose not to fail-closed.
    • Owner is always allowed.
    • Others depend on OtherPlayersCan... / AnyoneCanCreate....
  4. LuckPerms mode (granular permissions)
    When LuckPerms is enabled, actions are regulated through permission nodes (own/any/admin/etc.).

🧩 LuckPerms integration (fail-open vs fail-closed)

To actually use LuckPerms:

  • Install the LuckPerms mod/plugin on your server
  • In coins_and_markets.json set: Access.Provider.UseLuckPerms: true

What happens when LuckPerms is NOT available:

  • Fail-open (default): DefaultDenyWhenUnavailable=false
    → the mod does not block everything and continues using simple rules (owner/config).
  • Fail-closed (recommended for maximum safety): DefaultDenyWhenUnavailable=true
    → if LuckPerms is missing/not loaded, the mod denies protected actions (safer, but it can “lock” vendor/pouch actions until LP is back).

Dev/Admin commands fail-closed (default = ON): FailClosedCommands=true
If DevCommands are enabled and LuckPerms is configured, but LuckPerms is unavailable, commands are blocked for safety.

⚠️ Admin Vendor: Command Offers safety note

Admin Vendors can (if enabled) create offers that execute server commands (Command Offers).

  • Keep it OP-only (default) or restrict it with LuckPerms.
  • Avoid “dangerous” commands or commands that grant permanent privileges without safeguards.

βš™οΈ Configuration (Permissions / Protections / LuckPerms)

πŸ“ Where is the config file?

  • On first run the mod automatically generates: coins_and_markets.json
  • The file is stored in the mod’s data directory (server-side data folder for the mod/plugin).
  • If the JSON is invalid, the mod may start using defaults (always check console/logs).

πŸ”Œ Access.Provider — enable permissions + LuckPerms

Path: Access.Provider

  • Enabled (default: true)
    Enables permission checks.
    If false: permission checks are bypassed (the mod relies on basic rules / owner / config where applicable).
  • UseLuckPerms (default: false)
    If true, the mod uses LuckPerms as the permissions backend (when available).
    If LuckPerms is installed but UseLuckPerms=false, it will be ignored.
  • DefaultDenyWhenUnavailable (default: false)
    When UseLuckPerms=true but LuckPerms is unavailable:
    • falsefail-open (simple fallback, doesn’t block everything)
    • truefail-closed (denies protected actions until LuckPerms is back)
  • FailClosedCommands (default: true)
    If you use DevCommands and want them “safe”:
    true → if LuckPerms is unavailable, commands are blocked.

πŸ“ Access.Logging — permission check logs

Path: Access.Logging

  • LogChecks (default: false)
    Logs permission checks (useful for debugging; can be noisy on big servers).
  • LogDeniesOnly (default: false)
    If true, logs only denies (good for auditing without spam).

🧾 Access.Vendor.Use — using a Vendor (client/buy/sell)

Path: Access.Vendor.Use

  • RequirePermissionToUseVendor (default: false)
    • false → anyone can open the vendor UI (as a customer)
    • true → requires: coinsandmarkets.vendor.use

πŸ—οΈ Access.Vendor.Create — Vendor creation

Path: Access.Vendor.Create

Note: these options mainly matter in “simple mode” (no LuckPerms). With LuckPerms enabled, creation is handled via nodes.

  • AnyoneCanCreatePlayerVendors (default: true)
    Allows players to place/create Player Vendors.
  • AnyoneCanCreateAdminVendors (default: false)
    Allows players to place/create Admin Vendors (not recommended on public servers).

πŸ› οΈ Access.Vendor.Manage — other players managing vendors

Path: Access.Vendor.Manage

These options control whether other players (not the owner) can manage vendors in simple mode.

  • OtherPlayersCanEditVendors (default: false)
  • OtherPlayersCanStockVendors (default: false)
  • OtherPlayersCanWithdrawVendors (default: false)
  • OtherPlayersCanBreakVendors (default: false)

Tip: on public servers keep all false and delegate exceptions with LuckPerms.

⛏️ Access.Vendor.Break — staff break-any

Path: Access.Vendor.Break

  • AllowOpBreakAny (default: true)
    OPs can break any Player Vendor even if they’re not the owner.
  • AllowCreativeBreakAny (default: false)
    If true, players in Creative can break any Player Vendor.

πŸ‘‘ Access.Vendor.Admin — Admin Vendor rules + Command Offers

Path: Access.Vendor.Admin

Hard rules (OP-only)

  • OpOnlyCreate (default: true) — Admin Vendor creation is OP-only.
  • OpOnlyManage (default: true) — Admin Vendor management is OP-only.
  • OpOnlyOverridesPermissions (default: true)
    If true: OP-only is absolute (cannot be bypassed by LuckPerms).
    If false: you can delegate via LuckPerms (or bypass rules).

Bypass via permissions / creative

  • AllowPermissionBypass (default: true)
    Enables bypass nodes ...admin.<action>.bypass (only when LuckPerms is enabled).
  • AllowCreativeCreate (default: false)
  • AllowCreativeManage (default: false)
  • AllowCreativeEdit (default: false)
  • AllowCreativeStock (default: false)
  • AllowCreativeWithdraw (default: false)
  • AllowCreativeBreak (default: false)

Break bypass rules for Admin Vendors

  • AllowBreakBypassRules (default: false)
    If true, “break-any” rules (OP/Creative) can also apply to Admin Vendors.

Command Offers (Admin Vendor)

Path: Access.Vendor.Admin.CommandOffers

  • Enabled (default: true) — enables Command Offers.
  • OpOnly (default: true) — only OPs can use/manage Command Offers.
  • OpOnlyOverridesPermissions (default: true) — OP-only cannot be bypassed by permissions.
  • AllowPermission (default: true)
    If true and LuckPerms is enabled, you can delegate via: coinsandmarkets.vendor.admin.commands
  • AllowCreative (default: false) — if true, Creative can access without OP.

πŸ”‘ LuckPerms permission nodes — FULL LIST (v0.2.5)

Tip: you can also use wildcards (e.g. coinsandmarkets.*), but here are all individual nodes.

πŸ‘œ Pouch

  • coinsandmarkets.pouch.use — open the Coin Pouch UI
  • coinsandmarkets.pouch.withdraw — withdraw coins from the pouch (convert into physical items)

🧾 Vendor (customer use)

  • coinsandmarkets.vendor.use — open/use vendor UI (only if RequirePermissionToUseVendor=true)

πŸ—οΈ Vendor (creation)

  • coinsandmarkets.vendor.create.player — create/obtain Player Vendor (permission mode)
  • coinsandmarkets.vendor.create.admin — create/obtain Admin Vendor (permission mode)

🧰 Player Vendor (owner permissions)

  • coinsandmarkets.vendor.player.manage — “umbrella” owner permission (covers typical owner management)
  • coinsandmarkets.vendor.edit.own
  • coinsandmarkets.vendor.stock.own
  • coinsandmarkets.vendor.withdraw.own
  • coinsandmarkets.vendor.break.own

🧰 Vendor (manage others / staff)

  • coinsandmarkets.vendor.edit.any
  • coinsandmarkets.vendor.stock.any
  • coinsandmarkets.vendor.withdraw.any
  • coinsandmarkets.vendor.break.any

πŸ‘‘ Admin Vendor (management)

  • coinsandmarkets.vendor.admin.manage — “umbrella” Admin Vendor permission (edit/stock/withdraw/break)
  • coinsandmarkets.vendor.admin.edit
  • coinsandmarkets.vendor.admin.stock
  • coinsandmarkets.vendor.admin.withdraw
  • coinsandmarkets.vendor.admin.break

🧨 Admin Vendor (Command Offers)

  • coinsandmarkets.vendor.admin.commands — manage/create Command Offers (if enabled in config + LuckPerms active)

🧷 Admin Vendor (bypass nodes)

Only applies if: AllowPermissionBypass=true and LuckPerms is enabled.

  • coinsandmarkets.vendor.admin.create.bypass
  • coinsandmarkets.vendor.admin.manage.bypass
  • coinsandmarkets.vendor.admin.edit.bypass
  • coinsandmarkets.vendor.admin.stock.bypass
  • coinsandmarkets.vendor.admin.withdraw.bypass
  • coinsandmarkets.vendor.admin.break.bypass

πŸ§ͺ Dev/Admin Commands (only if Debug.DevCommandsEnabled=true)

  • coinsandmarkets.command.givecoins
  • coinsandmarkets.command.givepouch
  • coinsandmarkets.command.spawnvendor.player
  • coinsandmarkets.command.spawnvendor.admin
  • coinsandmarkets.command.setvendorowner

🧷 Quick LuckPerms examples (role templates)

Note: LuckPerms command syntax may vary depending on platform; treat these as permission “bundles”.

Default player (full economy + manage only own vendors)

  • coinsandmarkets.pouch.use
  • coinsandmarkets.pouch.withdraw
  • coinsandmarkets.vendor.player.manage
  • (optional) coinsandmarkets.vendor.use if you enabled RequirePermissionToUseVendor=true

Moderator (manage other players’ vendors / cleanup)

  • coinsandmarkets.vendor.edit.any
  • coinsandmarkets.vendor.stock.any
  • coinsandmarkets.vendor.withdraw.any
  • coinsandmarkets.vendor.break.any

Shop staff (Admin Vendors)

  • coinsandmarkets.vendor.admin.manage
  • (optional) coinsandmarkets.vendor.admin.commands if you want them to manage Command Offers

πŸ“Œ Notes

  • Early versions may evolve quickly: please report bugs & feedback in the Comments section.
  • The mod do not adds a default way to obtain coins, to create the economy of your world is up to you.