Skip to main content

FreeMinecraftModels Furniture Shop

FreeMinecraftModels ships with an optional Vault-backed shop that lets players buy craftable props with in-game currency. The shop is disabled by default — it only registers itself when explicitly enabled and a Vault economy provider is available.

Quick Setup

  1. Install Vault and a Vault-compatible economy provider (EssentialsX, CMI, etc.).
  2. Start the server once so plugins/FreeMinecraftModels/shop_config.yml is generated.
  3. Set enabled: true in shop_config.yml.
  4. Restart the server (the shop registers during startup).
  5. Run /fmm shop in-game to confirm the menu opens.

If any of those preconditions are missing, the /fmm shop command stays unregistered and players see a "no such command" error rather than the configurable disabled message.

How It Works

  • The shop reads recipes from plugins/FreeMinecraftModels/recipes/.
  • Every recipe with isEnabled: true and shopEnabled: true is listed in the shop.
  • Each entry shows the recipe's output item (the prop's paper placement item) with two added lore lines: a Price: line and a Click to purchase prompt.
  • Clicking an entry calls PurchaseHandler, which checks the player's balance via Vault, withdraws the price, and gives the player the placement item. Items that do not fit in inventory are dropped at the player's feet.

Permissions

PermissionDefaultDescription
freeminecraftmodels.shoptrueRequired to open the shop. Default is true so every player can browse

The permission alone does not enable the shop — enabled: true in shop_config.yml and a working economy provider are still required.

shop_config.yml

See the Configuration page for the full key reference. The headline keys are:

  • enabled — master toggle (default false)
  • defaultPrice — written into recipe files that do not set their own shopPrice
  • menuTitle, priceLoreFormat, clickToBuyLoreFormat — visual style
  • messages.* — five customizable feedback messages

All message strings support & color codes and the placeholders listed in the configuration reference.

Per-Recipe Fields

Each recipe in plugins/FreeMinecraftModels/recipes/<model_id>.yml carries two shop-specific fields:

isEnabled: true
model_id: "wooden_chair"
shape:
- "L L"
- "LLL"
- "L L"
ingredients:
L: OAK_LOG
shopEnabled: true
shopPrice: 250.0
FieldDefaultBehavior
shopEnabledtrueWhen false, the recipe is still craftable but never appears in /fmm shop
shopPricedefaultPrice from shop_config.ymlVault currency cost when the player clicks the item

The /fmm craftify builder writes both fields on save, so adjusting price is just a text edit on the recipe file followed by /fmm reload.

Purchase Outcomes

The PurchaseHandler recognizes five outcomes. Each maps to a configurable message in shop_config.yml:

OutcomeTriggered whenMessage key
SUCCESSWithdrawal succeeded and the item fit in inventorymessages.purchaseSuccess
SUCCESS_WITH_OVERFLOWWithdrawal succeeded but the item had to be dropped at the player's feetmessages.purchaseSuccess + messages.inventoryFull
INSUFFICIENT_FUNDSPlayer balance below price, or the underlying economy provider rejected the withdrawalmessages.insufficientFunds
NOT_FOR_SALERecipe is disabled or shopEnabled: falsemessages.itemNotForSale
SHOP_DISABLEDForce-disabled at runtime (e.g. economy provider went away)messages.shopDisabled

Troubleshooting

/fmm shop does not exist. The shop is unregistered. Verify all three of:

  • Vault is installed
  • An economy provider is registered (run /balance or /eco to confirm one is responding)
  • enabled: true in shop_config.yml

Then restart the server. The command registers only at startup.

Items I expect to see are missing from the menu. Open the recipe file in plugins/FreeMinecraftModels/recipes/. Check that both isEnabled and shopEnabled are true. Run /fmm reload after editing.

Players are charged but get no item. Check the server console for Vault errors. The handler only consumes currency after a successful balance check, but a downstream economy provider can still fail the actual withdrawal — the handler catches that and returns INSUFFICIENT_FUNDS. If withdrawal succeeded and the item failed to spawn, file a bug report with the full console log around the click.