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
- Install Vault and a Vault-compatible economy provider (EssentialsX, CMI, etc.).
- Start the server once so
plugins/FreeMinecraftModels/shop_config.ymlis generated. - Set
enabled: trueinshop_config.yml. - Restart the server (the shop registers during startup).
- Run
/fmm shopin-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: trueandshopEnabled: trueis 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 aClick to purchaseprompt. - 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
| Permission | Default | Description |
|---|---|---|
freeminecraftmodels.shop | true | Required 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 (defaultfalse)defaultPrice— written into recipe files that do not set their ownshopPricemenuTitle,priceLoreFormat,clickToBuyLoreFormat— visual stylemessages.*— 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
| Field | Default | Behavior |
|---|---|---|
shopEnabled | true | When false, the recipe is still craftable but never appears in /fmm shop |
shopPrice | defaultPrice from shop_config.yml | Vault 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:
| Outcome | Triggered when | Message key |
|---|---|---|
SUCCESS | Withdrawal succeeded and the item fit in inventory | messages.purchaseSuccess |
SUCCESS_WITH_OVERFLOW | Withdrawal succeeded but the item had to be dropped at the player's feet | messages.purchaseSuccess + messages.inventoryFull |
INSUFFICIENT_FUNDS | Player balance below price, or the underlying economy provider rejected the withdrawal | messages.insufficientFunds |
NOT_FOR_SALE | Recipe is disabled or shopEnabled: false | messages.itemNotForSale |
SHOP_DISABLED | Force-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
/balanceor/ecoto confirm one is responding) enabled: trueinshop_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.