Skip to content

Shop and Economy

Alexisleder edited this page Jul 8, 2026 · 1 revision

Shop and Economy

This page explains how shop and economy features work in LederProtections.

LederProtections can run without economy features, but if you want players to buy protection stones, pay for upgrades or pay teleport costs, you need Vault and a compatible economy plugin.


Economy Overview

Economy features are optional.

Feature Requires Vault Description
Protection shop Yes Allows players to buy protection stones.
Protection upgrades Yes, if upgrades have a cost Allows players to pay for larger protections.
Teleport costs Yes, if teleport cost is enabled Charges players when teleporting to protections.

If Vault is not installed, non-economy protection features can still work.


Required Economy Plugins

For economy features, you need:

  • Vault;
  • a compatible economy plugin.

Vault is only a bridge.

Vault does not create money by itself.

Example setup:

plugins/
├─ WorldEdit.jar
├─ WorldGuard.jar
├─ Vault.jar
├─ EconomyPlugin.jar
└─ LederProtections.jar

The economy plugin can be any Vault-compatible economy plugin supported by your server.


What Happens Without Vault?

If Vault is not installed:

Feature Behavior
Protection creation Can still work.
Protection GUI Can still work.
Role management Can still work.
Rule system Can still work.
Protection shop Economy purchases will not work.
Paid upgrades Economy costs will not work.
Teleport costs Economy costs will not work.

If you do not want economy features, you can leave Vault uninstalled and disable economy-related options.


Protection Shop

The protection shop allows players to buy configured protection stones from a GUI.

Common command:

/lep shop

Depending on configuration, the shop may also be accessible through the protection GUI.


Shop Requirements

To use the shop with prices:

Requirement Needed
Vault Yes
Economy plugin Yes
Shop enabled in config Yes
Stone enabled for shop Yes
Player permission Usually yes
Inventory space Yes

If the player's inventory is full, the purchase should be blocked safely.


Shop Safety

LederProtections includes safety checks for shop purchases.

The plugin should prevent cases such as:

  • charging money without giving the stone;
  • giving a stone when the player has no inventory space;
  • dropping purchased protection stones on the ground because the inventory is full;
  • reporting success when the purchase failed.

Recommended test:

  1. Fill your inventory.
  2. Try to buy a protection stone.
  3. Confirm the purchase is blocked.
  4. Confirm no money is taken.
  5. Confirm no item is dropped on the ground.

Stone Prices

Protection stone prices are usually configured in:

plugins/LederProtections/stones.yml

Example structure:

stones:
  x16:
    radius: 16
    price: 5000.0
    shop:
      enabled: true

The exact structure may depend on your generated stones.yml.


Example Price Progression

Example balanced survival pricing:

Stone Radius Example price
x4 4 500
x8 8 1500
x16 16 5000
x32 32 12000
x64 64 30000

These are only examples.

Server owners should adjust prices based on their economy.


Protection Upgrades

Protection upgrades can use economy costs.

Example upgrade path:

x4 → x8 → x16 → x32 → x64

When a player upgrades a protection, LederProtections can charge a cost before applying the upgrade.


Upgrade Cost Behavior

A common upgrade model is to charge the difference between the current stone value and the next stone value.

Example:

Current stone Current value Next stone Next value Upgrade cost
x16 5000 x32 12000 7000
x32 12000 x64 30000 18000

This prevents players from paying the full price again when upgrading.


Upgrade Safety

Before charging or applying an upgrade, LederProtections should verify:

  • the protection exists;
  • the player owns or can upgrade the protection;
  • the next stone type exists;
  • the new area does not overlap another protection;
  • the player has enough money;
  • the economy transaction succeeds;
  • the protection data can be saved.

Recommended test:

  1. Create a protection.
  2. Try upgrading it normally.
  3. Try upgrading without enough money.
  4. Try upgrading when the larger area would overlap another protection.
  5. Confirm money is only taken when the upgrade succeeds.

Teleport Costs

LederProtections can optionally charge players when they teleport to a protection.

Teleport behavior may include:

  • warmup time;
  • cancellation on movement;
  • cooldown;
  • optional cost.

Example:

teleport:
  enabled: true
  warmup-seconds: 3
  cancel-on-move: true
  cost: 100.0

The exact configuration structure may depend on your generated config.yml.


Teleport Cost Safety

Teleport cost should be charged only when the teleport succeeds.

Recommended test:

  1. Start a teleport.
  2. Move during warmup.
  3. Confirm the teleport is cancelled.
  4. Confirm money is not taken.
  5. Try teleporting again without moving.
  6. Confirm money is charged only when the teleport completes.

Economy Transaction Safety

LederProtections should avoid unsafe economy behavior.

Important safety goals:

Situation Expected behavior
Purchase succeeds Money is taken and stone is given.
Inventory is full Purchase is blocked and money is not taken.
Upgrade succeeds Money is taken and protection is upgraded.
Upgrade fails Money is not taken.
Teleport succeeds Cost is charged if configured.
Teleport is cancelled Cost is not charged.
Save fails Command or GUI should not report success.

Permissions

Shop and economy features may require permissions.

Common player permissions:

lederprotections.shop
lederprotections.upgrade
lederprotections.sethome

Stone usage permissions may also apply:

lederprotections.stone.4
lederprotections.stone.8
lederprotections.stone.16
lederprotections.stone.32
lederprotections.stone.64

See the permissions page for more details:

Permissions

Recommended Economy Setup

For a small survival server:

Stone Recommended access Example price
x4 Default players 500
x8 Default players 1500
x16 Default players 5000
x32 VIP or advanced players 12000
x64 Premium or late-game players 30000

This setup gives new players basic protection access while keeping larger protections valuable.


Shop Configuration Tips

Recommended practices:

  • Keep small protection stones affordable.
  • Make larger protections more expensive.
  • Use permissions to limit larger protection sizes.
  • Test purchases with a full inventory.
  • Test purchases without enough money.
  • Test each stone in the shop.
  • Keep economy values balanced with your server progression.

Upgrade Configuration Tips

Recommended practices:

  • Use clear upgrade paths.
  • Avoid skipping too many sizes unless intended.
  • Charge the difference between protection values.
  • Test overlap checks before allowing upgrades.
  • Test upgrades with and without enough money.
  • Make sure the next stone exists in stones.yml.

Teleport Economy Tips

Recommended practices:

  • Keep teleport costs reasonable.
  • Use warmup to avoid abuse.
  • Enable movement cancellation.
  • Charge only after successful teleport.
  • Test teleport cost with and without Vault.
  • Avoid high teleport costs on casual servers.

Common Issues

The shop does not open

Check that:

  • the shop is enabled;
  • the player has permission;
  • the command is correct;
  • there are no console errors.

The shop opens but purchases do not work

Check that:

  • Vault is installed;
  • an economy plugin is installed;
  • the economy plugin is compatible with Vault;
  • the stone has a price;
  • the stone is enabled in the shop;
  • the player has enough money;
  • the player has inventory space.

The player is charged but does not receive a stone

This should not happen.

Check:

  • console errors;
  • inventory space;
  • economy plugin behavior;
  • whether the server is using the latest LederProtections version.

Report the issue with reproduction steps if it happens.


Upgrades do not work

Check that:

  • upgrade paths are configured;
  • the next stone exists;
  • Vault is installed if cost is required;
  • the player has enough money;
  • the larger area does not overlap another protection;
  • the player has permission.

Teleport cost does not work

Check that:

  • teleport is enabled;
  • teleport cost is enabled;
  • Vault is installed;
  • an economy plugin is installed;
  • the player has enough money;
  • the teleport is not cancelled by movement.

Recommended Next Pages

Clone this wiki locally