Skip to main content

Shop System

EliteMobs ships with a built-in shop system that lets players spend and earn Elite Coins (the EliteMobs currency) on EliteMobs gear and arrows. The shops are normally accessed through Blacksmith and merchant NPCs in the Adventurer's Guild, but they can also be opened with commands.

Economy settings

Keep enableEconomy: true in EconomySettings.yml for normal shop use. The Dynamic and Custom Shop entry menus check this setting, but direct admin menu commands and the Sell and Arrow NPC paths do not provide the same gate. It is not a universal access-control switch. With working Vault integration, balances use the Vault provider instead of the EliteMobs currency database.

Currency​

The default currency is called Elite Coins (currencyName in EconomySettings.yml). Players earn it primarily by killing elites (currency showers) and by selling EliteMobs loot. Balances can be checked and paid using the standard money commands:

  • /em money check – check your balance (there is no /em wallet command; some config comments still refer to it by that old name)
  • /em pay <player> <amount> – pay another player (subject to playerToPlayerPaymentTaxes)

Admins can manage balances with /em money add|remove|set and friends.

The shops​

Dynamic Shop (procedurally generated gear)​

Use /em shop dynamic or talk to the Blacksmith NPC (elitemobs.shop.dynamic.npc). The player command redirects to the Guild when agTeleport is enabled, the Guild is installed, and the player has elitemobs.adventurersguild.teleport; otherwise it opens the buy-or-sell menu. The NPC opens that menu directly.

The Dynamic Shop uses configured stock slots in a 54-slot menu for procedurally generated EliteMobs weapons and armor. Offered levels follow your skill level for that item type: each item is rolled between (skillLevel - 5) and skillLevel, within 1–100. At skill level 105 or higher, all offers for that skill are level 100. Materials with no matching skill use the level derived from your average XP across all skill types.

  • Click an item to buy it. The price is its calculated worth. Buying requires enough funds, an empty storage slot, and passing the applicable skill requirement to equip the item. The skill check respects the gear-restriction setting and its exceptions, including items at level 20 or below.
  • Use the reroll button to refresh the offered stock (short 2-second cooldown).
  • Buying an item also refreshes the stock.

Custom Shop (special items)​

Use /em shop custom or talk to the Special Blacksmith NPC (elitemobs.shop.custom.npc). The player command follows the same Guild redirection rule as the Dynamic Shop; the NPC opens the buy-or-sell menu directly.

The Custom Shop draws random entries from its eligible Custom Items pool. itemType: CUSTOM is eligible; UNIQUE, DROPPABLE and CLASS_LOOT are excluded. Offered copies are soulbound to the buyer when soulbinding is enabled. Keep at least one eligible item: the current stock picker cannot populate an empty pool.

Purchases require enough funds and an empty storage slot. This menu does not apply the Dynamic Shop's skill check, so buying an item does not prove that the player can equip it. The reroll button has a 2-second cooldown; purchases also refresh the stock.

Selling items​

Selling is reached through the Sell option of the buy-or-sell menu (after opening the Dynamic or Custom Shop), or directly by an admin with /em shop sell <player> (elitemobs.shop.sell.other). The Selling items Blacksmith NPC uses the elitemobs.shop.sell.npc permission.

In the Sell menu:

  • Click EliteMobs items in your inventory to move their stacks into the sell slots. Vanilla items are rejected. Unbound EliteMobs items and items soulbound to you are accepted. Items bound to another player are rejected unless soulbind checking is disabled or you have its bypass permission.
  • The confirm button shows the running total. Click it to sell everything and receive Elite Coins.
  • Resale value is a fraction of the item's stored worth, or its calculated worth when no stored value exists, set by itemResaleValue in EconomySettings.yml (default 5%). Stack size multiplies the payout.
  • Sale income pays outstanding gambling debt first; only the remainder increases the spendable balance.
  • Each stack is credited separately. If the economy provider rejects a credit, that stack goes back to you, the sale stops and shopTransactionFailedMessage is shown. Stacks credited before that point stay sold.

Arrow Shop​

Opened by talking to the Arrow Shop NPC (elitemobs.shop.arrow.npc).

The Arrow Shop sells ammunition for Elite Coins. The default stock includes:

  • Regular arrows (a small stack and a large stack)
  • Spectral arrows
  • Tipped arrows of Poison, Slowness, Weakness, Harming, and Healing

Each entry's amount and price are configurable in menus/arrow_shop_menu.yml. Click an arrow to buy it; purchases require enough funds and an empty inventory slot, even if arrows could stack elsewhere. Stock slots are fixed in the menu implementation. Restart after changing stock prices, amounts or item names: the stock catalog is cached when the menu class first loads.

Commands and permissions​

CommandPermissionDefaultDescription
/em shop dynamicelitemobs.shop.dynamictrueOpens the dynamic shop entry menu or requests Guild teleportation
/em shop procedural <player>elitemobs.*opOpens the dynamic (procedural) shop for another player
/em shop customelitemobs.shop.commandcode-onlyOpens the custom shop entry menu or requests Guild teleportation; grant this actual command node when needed, rather than the unused declared elitemobs.shop.custom
/em shop custom <player>elitemobs.shop.custom.otheropOpens the custom shop for another player
/em shop sell <player>elitemobs.shop.sell.otheropOpens the sell menu for another player

NPC interaction permissions (granted to players by default via the elitemobs.user bundle):

PermissionNPC
elitemobs.shop.dynamic.npcBlacksmith (dynamic shop)
elitemobs.shop.custom.npcSpecial Blacksmith (custom shop)
elitemobs.shop.sell.npcSelling items
elitemobs.shop.arrow.npcArrow Shop

Configuration​

The shop economy is configured in EconomySettings.yml. Notable keys:

KeyDefaultEffect
enableEconomytrueEnables normal economy entry points; does not block every direct shop path
currencyNameElite CoinsDisplay name of the currency
useVaultfalseRoute balances through Vault instead of the EliteMobs database
itemResaleValue5Percentage of full item worth paid when selling
playerToPlayerPaymentTaxes0.2Tax rate (0.0–1.0) applied to /em pay transfers (0.2 = 20%)
enableCurrencyShowertrueWhether elites drop coins on death
currencyShowerTierMultiplier1.0Multiplier on dropped currency (2.0 = double)
materialWorth.defaultMaterialWorth1Worth used for any material without its own materialWorth.<MATERIAL> entry

materialWorth.<MATERIAL> entries use fixed defaults from the plugin's material tiers: netherite 18, diamond and trident 17, iron 16, stone and chainmail 15, and gold, wood and leather 13. These tier constants are not configuration settings. Change the individual materialWorth entries in EconomySettings.yml to set shop prices.

Menu layouts (slots, item icons, names, and messages) for each shop live in the EliteMobs menu config files (for example the buy-or-sell, custom shop, procedural shop, sell, and arrow shop menu configs).

Calculated purchase worth combines material, enchantment and potion-effect values, with a base value of 1. Existing stored resale values can therefore differ from newly calculated purchase prices after you change pricing settings.

Every purchase withdraws the price first and hands over the item only after the economy provider accepts the payment. If the provider rejects the payment, the player gets the insufficient-funds message and nothing is delivered. If the transaction fails partway, the player sees shopTransactionFailedMessage and the server log records the price, whether the debit was accepted and the item, so an administrator can settle it.