Farmstead Mods
EN

Экономика

Балансы, переводы, /baltop, магазины на сундуках и NPC, Vault API.

На этой странице

Команды 15#

КомандаСинтаксисАлиасыПравоОписание
/bal/bal—neoessentials.economy.balanceCheck your balance (alias)Отдельная регистрация в BalanceCommand, корень тоже neoessentials.economy.balance: только свой баланс, аргумента <player> нет. Чужой счёт — исключительно /balance <player>.
/balance/balance [player]—neoessentials.economy.balanceCheck your balanceКорень /balance, /bal и /money закрыт neoessentials.economy.balance. Голый /balance смотрит свой счёт. Ветка [player] закрыта neoessentials.economy.balance.others (или OP 2). Имя резолвится через EconomyPlayerUtil — офлайн тоже. Консоль не проходит: executeOther зовёт getPlayerOrException у отправителя. Алиас /money в том же файле — только свой баланс, как /bal.
/balancetop/balancetop [page]—neoessentials.economy.baltopView top balances (alias)Тот же узел, что /baltop: цикл {baltop, balancetop, btop} в BaltopCommand.register.
/baltop/baltop [page]—neoessentials.economy.baltopView top balancesneoessentials.economy.baltop; консоль проходит (player == null). Без [page] — страница 1, IntegerArgumentType от 1. Размер страницы 10 и TTL кэша 60 с зашиты в BaltopCommand, ключей в economy.json нет. Игроки с neoessentials.economy.baltop.exempt в таблицу не попадают. Алиас /btop регистрируется в том же цикле, отдельной карточки у него нет.
/chestshop/chestshop [list [player] | info | convert | remove [<x> <y> <z>] | setprice <buy|sell|both> <price> | stats | limit | export | import [create] | reload | pricing | hologram enable|disable|enablepos <x> <y> <z>|move <x> <y> <z>]—neoessentials.chestshopSign-based chest shop systemГолый /chestshop печатает справку; корень требует neoessentials.chestshop (консоль проходит). Прицел у info/convert/setprice/remove без координат/hologram — player.pick(5.0). list [player] — чужие только с neoessentials.shop.list.others или OP 3 и только онлайн. convert — neoessentials.shop.create. remove без координат — владелец или shop.admin.remove/OP 3; с координатами — только админ. setprice — shop.setprice или shop.admin.setprice, чужой знак — только admin.setprice. hologram enablepos вызывается кнопкой из чата после создания знака. reload — OP 3 или shop.admin.reload. Алиаса /shop в коде нет, несмотря на javadoc ShopCommand.
/cshop/cshop [list [player] | info | convert | remove [<x> <y> <z>] | setprice <buy|sell|both> <price> | stats | limit | export | import [create] | reload | pricing | hologram enable|disable|enablepos <x> <y> <z>|move <x> <y> <z>]—neoessentials.chestshopSign-based chest shop (alias)redirect на узел chestshop и только если в commands включены оба ключа chestshop и cshop. Если включён один cshop — не регистрируется ничего.
/eco/eco give|take <player> <amount> | set <player> <amount> | reset <player> | history [player]—neoessentials.economy.ecoAdmin economy commandsКорень — OP 2 или neoessentials.economy.eco; голого /eco нет. give/take — сумма от 0.01, set — от 0.0 (отрицательное отсекается в execute). Имена резолвятся офлайн через профиль; строка на @ — ванильный селектор, только онлайн (квесты: /eco give @p 100). history без аргумента — своя лента; [player] дополнительно требует именно source.hasPermission(2), одного eco-узла мало. Алиас /economy — то же дерево. Процентный синтаксис 10% не поддерживается.
/npcshop/npcshop [create <name> | remove | additem <shopId> <item> <buyPrice> <sellPrice> <quantity> | removeitem <shopId> <index> | list | info <shopId> | reload | respawn <shopId> | entitytype <shopId> <entityType> <ai>]—neoessentials.shop.npc.manageNPC entity shop managementВесь узел — OP 3 или neoessentials.shop.npc.manage; голый /npcshop — справка. <name> у create — greedyString (пробелы можно). <shopId> — UUID или однозначный префикс из /npcshop list. additem: <item> — word(), в листинг всегда пишется "minecraft:" + item без префикса minecraft:; buy/sell от −1 (−1 отключает сторону), quantity от 1. remove — ближайшая сущность-магазин в 5 блоках. Покупка в GUI требует neoessentials.shop.use (ПКМ — купить, ЛКМ — продать).
/pay/pay <player> <amount>—neoessentials.economy.paySend money to another playerПраво neoessentials.economy.pay (узел .requires плюс повторная проверка в execute). <amount> — DoubleArgumentType от 0.01, проценты вроде 10% Brigadier не примет. Подсказки имён — только онлайн, но с neoessentials.economy.pay.offline перевод уходит в профиль из кэша. Алиас /p регистрируется в том же PayCommand, отдельной команды в этом файле у него нет. Кулдаун в конфиге отсутствует: ConfigManager.getPayCooldownSeconds() всегда возвращает 0.
/payconfirmtoggle/payconfirmtoggle—neoessentials.payconfirmtoggle по соглашениюToggle payment confirmation promptsРегистрирует MiscItemCommands, не EconomyCommands. Право neoessentials.payconfirmtoggle. Только игрок. Флаг живёт в in-memory Set и с рестартом сбрасывается. /pay этот флаг не читает — см. knownIssues.
/paytoggle/paytoggle—neoessentials.economy.paytoggleToggle receiving paymentsneoessentials.economy.paytoggle (или OP 2). Только игрок: getPlayerOrException. Значение пишется сразу в коллекцию pay_toggles. Пока записи нет, действует economy.json → paytoggleDefault (в шаблоне true — платежи принимаются).
/pt/pt—neoessentials.item.powertoolBind commands to items (alias)Голый /pt — это paytoggle: PayToggleCommand регистрирует literal("pt").executes раньше PowertoolCommand. После слияния Brigadier /pt list, /pt remove и /pt <command> принадлежат powertool (neoessentials.item.powertool), не экономике. Не считайте подкоманды частью paytoggle.
/sell/sell [hand [amount] | inventory|all|invent | <item> [amount]]—neoessentials.sell по соглашениюSell items for moneyКорень — neoessentials.sell. Голый /sell и ветка hand дополнительно требуют neoessentials.sell.hand; inventory/all/invent — neoessentials.sell.bulk. <item> — StringArgumentType.word() (пробелы нельзя, двоеточие можно). Множитель — config.json → economy.sellMultiplier плюс тиры neoessentials.economy.sellmultiplier.N. Переименованные предметы (CUSTOM_NAME) не продаются, пока economy.allowSellNamedItems не true.
/setworth/setworth <item> <price|remove>—neoessentials.setworth по соглашениюSet the sell price of an itemneoessentials.setworth. <item> — ResourceLocationArgument: diamond и minecraft:diamond оба валидны; литерала hand нет, строка hand нормализуется в minecraft:hand и тогда берётся основная рука. <price> — DoubleArgumentType от 0; 0 в WorthManager.setPrice удаляет цену так же, как литерал remove. Пишет в коллекцию item_worth сразу, /neoe reload для этого не нужен.
/worth/worth [hand [amount] | <item> [amount]]—neoessentials.worth по соглашениюCheck the sell value of an itemneoessentials.worth; без аргументов и /worth hand — предмет в основной руке (qty = размер стека, если amount не задан). Ветка <item> — greedyString: хвост-число читается как количество («diamond 64», «thermal:copper_ingot 16»), иначе qty = 1. Команда не регистрируется, если modules.economyEnabled выключен или commands.worth = false.

Примеры#

Первые деньги на пустом сервере#

Модуль уже включён (modules.economyEnabled), но у игроков только стартовый баланс, и нужно проверить переводы, налог и таблицу богачей до открытия вайпа.

/eco give Steve 1000
/pay Alex 200
/balance Alex
/baltop

В шаблонном economy.json ключа startingBalance нет — новым UUID начисляется 100.0 из кода. /eco give пишет в коллекцию economy_balances и шлёт онлайн-цели «received_give». /pay списывает с отправителя ровно 200: при taxPercentage 0 комиссия 0, получатель видит ту же сумму. Поставьте taxPercentage: 5 и повторите — отправитель всё равно теряет 200, получатель 190, 10 сгорают (не на счёт сервера). /balance Alex требует neoessentials.economy.balance.others; без узла сработает только /balance у самого Alex. Первый /baltop часто отвечает «building» — кэш собирается асинхронно, через секунду команда показывает топ и возраст кэша в секундах.

Прайс /sell с нуля, без worth.json руками#

Игроки должны сдавать алмазы и всю руду командой, а не через сундук. Цены живут в хранилище item_worth, не в конфиге.

/setworth minecraft:diamond 25
/setworth hand 4
/worth diamond 64
/sell hand
/sell inventory

Первая команда ставит 25 за алмаз. Вторая берёт id из основной руки (держите iron_ingot) — это minecraft:hand, не отдельный литерал. /worth diamond 64 печатает 1600 при символе из economy.json только если вы смотрите /pay; /worth и /sell читают currencySymbol из секции economy в config.json, а не из economy.json — этого ключа в config.json больше нет, поэтому почти всегда увидите $. Голый /sell = /sell hand и не обходит neoessentials.sell.hand. inventory/all/invent требуют sell.bulk и пропускают предметы с CUSTOM_NAME, пока allowSellNamedItems false — в чат придёт named_items_skipped. Множитель 1.0 в config.json → economy.sellMultiplier; тир neoessentials.economy.sellmultiplier.150 даёт ×1.5 поверх, если он выше глобального.

Игровой сундук-магазин с предметом из руки и голограммой#

Игрок продаёт зачарованный лук, а не «голый» minecraft:bow. Имя на 4-й строке знака NBT не несёт.

/chestshop convert
/chestshop hologram enable
/chestshop info
/chestshop limit

Поставьте сундук, на соседний блок — табличку. Строка 1 (индекс 0) пустая или [Shop], строка 2 — количество (1…3456), строка 3 — B 50:S 20 (или B FREE / S 1K), строка 4 — ?. На заполнение знака есть 30 с после установки, иначе pending сгорает. convert нужен, если табличку написали раньше, чем обработчик её увидел; обычная установка регистрируется сама, как только все 4 строки заполнены. ПКМ по знаку с луком в руке «впекает» DataComponents; без этого сундук с тем же луком будет «out of stock». После создания в чат приходит кликабельная кнопка — она шлёт /chestshop hologram enablepos ; то же делает enable, если смотрите на знак (не дальше 5 блоков). Голограмма id вида shop__, по умолчанию выкл. ПКМ по чужому знаку — покупка, ЛКМ — продажа, оба требуют neoessentials.shop.use; владелец вместо сделки видит info. Сломать знак: шифт+ЛКМ, иначе удар перехватывается как продажа. Двойной сундук делит 54 слота на оба знака.

Админ-магазин без сундука и лимита слотов#

Спавн продаёт еду бесконечно. Игровой лимит maxShopsPerPlayer на админ-знаки не действует.

/chestshop list
/chestshop setprice buy 8
/chestshop stats

На строке 1 напишите точно Admin Shop — нужно neoessentials.shop.create.admin, иначе «no_permission_admin». Сундук не ищется, сток не кончается. В шаблонном config.json ключа shop.maxShopsPerPlayer нет, для обычных игроков лимит кода = 10; админ-знаки в этот счётчик не входят. list без аргумента — ваши знаки; чужие ники только онлайн и с shop.list.others. setprice меняет цену на знаке под прицелом и переписывает текст таблички; type не из {buy,sell,both} отвалится уже в execute. Голограмму админ-магазина включает только тот, у кого shop.create.admin: общий OP и shop.admin.remove для этого не считаются (isShopOwner).

NPC-магазин: создать, наполнить, сменить сущность#

Торговец без сундука и без знака, GUI как у админ-ChestShop: предметы чеканятся и топятся напрямую.

/npcshop create Оружейник спавна
/npcshop list
/npcshop additem ab12cd34 diamond 50 -1 1
/npcshop additem ab12cd34 emerald -1 20 16
/npcshop info ab12cd34
/npcshop entitytype ab12cd34 minecraft:villager true

create спавнит неуязвимый ArmorStand на ваших координатах и печатает полный UUID плюс 8-символьный префикс — его и подставляйте. additem с −1 на sell делает слот только на покупку; оба −1 команда отвергает. ПКМ по NPC открывает GUI (neoessentials.shop.use): ПКМ по слоту — купить, ЛКМ — продать, если sell-цена задана. entitytype пересоздаёт сущность на месте; true у моба включает ИИ, но его «привязывает» к точке спавна (радиус 6). Если сущность съел войд — /npcshop respawn , листинги в npc_shops не пропадают. /npcshop reload перечитывает хранилище; /neoe reload это не делает.

Тонкие места#

Голый /pt — paytoggle, /pt list — powertool#

PayToggleCommand.register ставит literal("pt").executes(paytoggle) из EconomyCommands (раньше в NeoEssentials.java). Позже PowertoolCommand.registerPtAlias вешает на тот же литерал list, remove и greedy <command> без корневого .executes(). Brigadier сливает узлы: первое .executes() живёт, дети добавляются. Итог: /pt переключает приём платежей (neoessentials.economy.paytoggle), /pt list / /pt remove / /pt <command> — powertool (neoessentials.item.powertool). PayToggle регистрирует /pt всегда, без проверки commands.pt; powertool-дети появляются только если commands.pt включён. Если commands.paytoggle выключен, голый /pt остаётся без .executes() и считается незавершённой командой.

Что делать: Игрокам для отказа от переводов выдавайте /paytoggle. Админам powertool объясняйте: список биндов — /pt list или /powertool list, не голый /pt.

/bal не смотрит чужие счета, офлайн у /pay и /balance.others — разные узлы#

/bal зарегистрирован без аргумента: только свой баланс. /balance <player> закрыт neoessentials.economy.balance.others и резолвит офлайн через профиль. Консоль не откроет чужой баланс — executeOther требует игрока-отправителя. /pay офлайн пускает только с neoessentials.economy.pay.offline; без узла — offline_not_allowed, даже если ник есть в кэше. Автодополнение /pay и /eco показывает лишь онлайн. Игнорирование (IgnoreManager) блокирует /pay только если получатель онлайн — офлайн-перевод ignore не видит. /chestshop list <player> офлайн не ищет вовсе: только getPlayerByName.

Что делать: Для штаба: пара balance + balance.others. Казначеям офлайн-выплат — pay.offline. Смотреть чужие знаки — shop.list.others, и цель должна быть в игре.

Налог /pay жжёт разницу, не кладёт её на сервер#

EconomyAPI.payPlayer списывает с отправителя полный <amount>, получателю зачисляет amount − fee, fee никуда не капает. taxPercentage в economy.json — проценты (5 = 5%). Ставка берётся из EconomyModifierManager.getEffectiveTaxRate: neoessentials.economy.taxexempt обнуляет (через hasPermissionStrict, OP сам по себе льготу не даёт, пока permissions.opsBypassEconomyModifierPermissions false). При налоге ≥ 100% net ≤ 0 и перевод отклоняется. Потолок одного перевода — maxTransferAmount (шаблон 10000) или тир neoessentials.economy.paylimit.N / LuckPerms meta; обход — neoessentials.economy.pay.bypass.limit.

Что делать: Пишите в правила, что комиссия сгорает. Льготникам — neoessentials.economy.taxexempt, не «просто OP».

paytoggle по умолчанию включён и переживает рестарт#

paytoggleDefault: true значит «принимаю /pay». Пока игрок ни разу не вызвал /paytoggle, в кэше его нет и каждый /pay ему проходит. После переключения запись сразу попадает в коллекцию pay_toggles активного storage.type (легаси paytoggles.json импортируется один раз). Сообщение отказа то же, что при ignore (pay.toggled_off) — по чату не отличить «выключил приём» от «игнор».

Что делать: Если новичкам нельзя кидать деньги до согласия — поставьте paytoggleDefault: false. Проверить свой статус можно только повторным /paytoggle (отдельного get нет).

Голограмма над знаком — opt-in, не автосоздание#

ShopData.hologramEnabled по умолчанию false. После создания знака в чат даётся кнопка /chestshop hologram enablepos x y z. Включить/сдвинуть голограмму игрового магазина может только владелец: isShopOwner не смотрит OP и shop.admin.remove. У Admin Shop ownerUUID == null, поэтому нужен neoessentials.shop.create.admin. Смещение move зажато Brigadier на ±4.5. Id — префикс shop_. ShopHologramManager не проверяет modules.hologramEnabled и пишет напрямую в HologramManager. /chestshop reload после перечитывания коллекции chest_shops чистит осиротевшие shop_* голограммы.

Что делать: Игрокам говорите жать кнопку в чате или смотреть на свой знак и /chestshop hologram enable. Модераторам чужие голограммы снимать через /hologram remove <id>, не через /chestshop hologram disable.

Что делает /neoe reload, а что нет#

ConfigManager.loadAll() сбрасывает кэш, поэтому следующий /pay уже видит новый taxPercentage / currencySymbol из economy.json. EconomyManager.reinitialize() срабатывает только если singleton так и не доинициализировался на старте (модуль показался выключенным в гонке загрузки) — живые балансы с диска заново не читаются. WorthManager.reload() перечитывает item_worth. Коллекции chest_shops и npc_shops /neoe reload не трогает: для знаков — /chestshop reload (ещё и shop.pricing в config.json), для NPC — /npcshop reload. modules.economyEnabled / modules.shopEnabled и флаги commands.* читаются при регистрации: включить /pay или магазины после смены ключа можно только рестартом.

Что делать: Правка economy.json (налог, символ, потолок) — /neoe reload. Правка знаков в хранилище или динамических цен — /chestshop reload. Правка NPC — /npcshop reload. Смена modules.* — рестарт.

startingBalance нет в шаблонном economy.json#

Геттер смотрит ключ startingBalance в economy.json и, не найдя, возвращает 100.0. /eco reset ставит именно это значение, не «ноль». В config.json дубль ключа убрали в v32 — править нужно economy.json. cleanupInactiveAccounts + inactiveAccountCleanupDays (30) раз в час вычищают счета без активности; это не делает /eco reset.

Что делать: Добавьте startingBalance в config/neoessentials/economy.json и /neoe reload — новые UUID и reset подхватят число. Уже существующие балансы сами не изменятся.

/npcshop additem всегда клеит namespace minecraft:#

executeAddItem сохраняет "minecraft:" + itemId.replace("minecraft:", ""). diamond и minecraft:diamond становятся minecraft:diamond. thermal:copper_ingot превращается в minecraft:thermal:copper_ingot и в GUI не матчится с настоящим предметом. На знаке ChestShop модовый id на 4-й строке резолвится нормально (ShopParser не форсирует minecraft:), как и /setworth thermal:copper_ingot.

Что делать: В NPC для ванили пишите короткий id. Модовый товар в NPC этой командой не задать корректно — только правкой коллекции npc_shops и /npcshop reload, либо торгуйте им через знак.

/eco history чужого игрока — ванильный OP 2, не eco-узел#

Корень /eco пускает OP 2 или neoessentials.economy.eco. Ветка history <player> дополнительно .requires(src -> src.hasPermission(2)). Игрок с одним eco-узлом без OP откроет /eco give и свою /eco history, но не /eco history Steve. Лимит ленты — transactionHistoryLimit (в шаблоне 50; если ключ вырезать, геттер даёт 20).

Что делать: Аудиторам истории выдавайте OP 2 (или консоль). Для выдачи денег достаточно neoessentials.economy.eco.

Знак магазина: формат строк и таймаут 30 с#

Индексы 0…3, не «строка 1» из старой английской вики в человеческом смысле совпадает, но путают с ценой: строка 0 — имя / Admin Shop / [Shop] / пусто; 1 — целое 1…3456; 2 — B 10, S 5, B 10:S 5, суффиксы K/M, FREE; 3 — id или ?. Игровому знаку нужна соседняя ChestBlockEntity (6 сторон + под табличкой). Пока игрок редактирует текст, обработчик ждёт до 30 с. После регистрации текст знака косметический: источник истины — коллекция chest_shops, не табличка.

Что делать: Не меняйте цены правкой таблички в мире — /chestshop setprice или импорт CSV. Не успели заполнить за 30 с — сломайте и поставьте знак снова, либо /chestshop convert, смотря на него.

Известные проблемы#

/payconfirmtoggle ничего не делает с /pay#

Комментарий в MiscItemCommands обещает поведение Essentials Commandpayconfirmtoggle: «toggle whether /pay asks for confirmation». Команда пилит UUID в in-memory Set, геттер isPayConfirmDisabled больше нигде не вызывается. В PayCommand нет ни подтверждения, ни обращения к этому Set — перевод уходит сразу после проверок баланса, налога и paytoggle. Флаг ещё и не пишется на диск, рестарт его обнуляет.

Что делать: Не обещайте игрокам «сначала подтверди перевод». Если нужны подтверждения — это не эта команда; сейчас она только меняет строку в чате о своём внутреннем флаге.

Конфигурация#

economy.json#

КлючПо умолчаниюОписание
currencySymbol"$"Symbol shown before money amounts (e.g. "$100.00")
currencyName"coins"Singular currency name shown in messages
currencyNamePlural"coins"Plural currency name
onboardingCompletionReward25000Coins awarded once when a genuinely new player completes the Farmstead onboarding route. Set to 0 to disable.
maxBalance999999999.99Maximum balance a player can hold (999999999.99 = ~1 billion)
taxPercentage0.0Global tax percentage on all transfers (0.0 = no tax)
allowNegativeBalancesfalseAllow player balances to go negative
logTransactionstrueLog every transaction to logs/neoessentials/transactions.log
transactionHistoryLimit50Maximum number of transactions kept per player for /history
maxTransferAmount10000.0Maximum amount that can be sent in a single /pay transfer
paytoggleDefaulttrueDefault state of /paytoggle (true = payments enabled on join)
cacheMaximumSize10000Caffeine cache maximum size for in-memory balance lookups
cacheExpireAfterAccessMinutes60Minutes after last access before a cache entry expires
cleanupInactiveAccountstrueRemove economy accounts for players inactive longer than inactiveAccountCleanupDays
inactiveAccountCleanupDays30—

Права 30#

УзелВ реестреЧто даёт
neoessentials.chestshopреестр: нетUse /chestshop (and /cshop) command tree
neoessentials.economy.adminреестр: нетEconomy administration
neoessentials.economy.admin.giveреестр: нетGive money to players
neoessentials.economy.admin.setреестр: нетSet player balance
neoessentials.economy.admin.takeреестр: нетTake money from players
neoessentials.economy.balanceреестр: даCheck own balance
neoessentials.economy.balance.othersреестр: нетCheck others' balance
neoessentials.economy.baltopреестр: даView balance leaderboard
neoessentials.economy.baltop.exemptреестр: нетExclude self from baltop ranking
neoessentials.economy.ecoреестр: нетRun /eco admin commands (give/take/set/reset)
neoessentials.economy.payреестр: даSend payments to online players
neoessentials.economy.pay.offlineреестр: нетSend payments to offline players
neoessentials.economy.pay.toggleреестр: даToggle payment acceptance
neoessentials.payconfirmtoggleреестр: даToggle payment confirmation prompts
neoessentials.sellреестр: даUse the /sell command
neoessentials.sell.bulkреестр: даSell entire inventory (/sell inventory|all)
neoessentials.sell.handреестр: даSell item in hand (/sell hand)
neoessentials.setworthреестр: нетSet item sell prices (/setworth)
neoessentials.shop.admin.csv.exportреестр: нетExport shops to CSV file
neoessentials.shop.admin.csv.importреестр: нетImport shops from CSV file
neoessentials.shop.admin.reloadреестр: нетReload shop data from disk
neoessentials.shop.admin.removeреестр: нетForce-remove any shop
neoessentials.shop.admin.setpriceреестр: нетSet price on any shop sign
neoessentials.shop.createреестр: даCreate player chest shops
neoessentials.shop.create.adminреестр: нетCreate admin chest shops
neoessentials.shop.list.othersреестр: нетList shops owned by other players
neoessentials.shop.npc.manageреестр: нетCreate/remove/manage NPC shops (/npcshop)
neoessentials.shop.setpriceреестр: даSet price on own shop sign (/chestshop setprice)
neoessentials.shop.useреестр: даUse (buy/sell at) shops
neoessentials.worthреестр: даCheck the sell value of an item (/worth)

Подробное руководство#

Раздел ниже — исходная документация проекта (docs/Wiki/EconomySystem.md). Ссылки на другие страницы вики переписаны на этот сайт; текст самих руководств не редактируется, чтобы синк с апстримом не давал конфликтов.

Version: 1.0.5+build.54 · Config files: economy.json, config.json → economy section


Overview#

NeoEssentials provides a full server economy with player balances, payments, admin tools, an async leaderboard, a sign-based ChestShop, entity-based NPC shops, and Vault API integration.


Config (economy.json)#

Note: modules.economyEnabled (in config.json) is the master on/off switch — economy.json itself has no enabled key.

Key Default Description
startingBalance 100.0 Balance given to new players
currencySymbol "$" Symbol prepended to all amounts
currencyName (currency symbol) Full currency name (singular)
currencyNamePlural (currencyName) Full currency name (plural)
maxBalance 999999999.99 Maximum balance a player can hold
allowNegativeBalances false Allow balances below zero
taxPercentage 0.0 Tax applied to /pay transfers (as a percent, e.g. 5 = 5%)
maxTransferAmount 10000.0 Max single /pay amount (overridable per-player via LuckPerms meta)
paytoggleDefault true Whether players accept payments by default
logTransactions true Log transactions to logs/neoessentials/transactions.log
transactionHistoryLimit 50 Max entries kept per player for /eco history
cleanupInactiveAccounts true Automatically delete balances for long-inactive accounts
inactiveAccountCleanupDays 30 Inactivity threshold (days) before an account is cleaned up
cacheMaximumSize 10000 Max entries in the balance cache
cacheExpireAfterAccessMinutes 60 Cache entry expiry (minutes)

/sell's multiplier and named-item rule are read from config.json → economy (not economy.json):

Key Default Description
sellMultiplier 1.0 Global multiplier applied to all /sell prices
allowSellNamedItems false Allow selling renamed items
useExternalEconomy false Use a detected external economy mod (e.g. SG Economy API) instead of NeoEssentials' own internal balances, registered at higher priority into the Vault service registry. Off by default — switching which mod controls player money is opt-in.

/baltop's page size (10) and cache lifetime (60s) are currently hardcoded and not configurable.


Commands#

Player Commands#

Command Syntax Permission Description
/balance /balance [player] neoessentials.economy.balance (own) / neoessentials.economy.balance.others (other players) Check your balance
/bal alias same Alias
/pay /pay <player> <amount> neoessentials.economy.pay Send money to a player (applies tax; has a per-player cooldown)
/p alias same Alias
/paytoggle /paytoggle neoessentials.economy.paytoggle Toggle receiving payments
/pt alias same Alias
/baltop /baltop [page] neoessentials.economy.baltop View top balances (paginated, async, exempt via neoessentials.economy.baltop.exempt)
/balancetop, /btop alias same Aliases
/worth /worth [item\|hand] [qty] neoessentials.worth Check sell value of an item
/sell /sell hand\|inventory\|all\|<item> [qty] neoessentials.sell (+ neoessentials.sell.hand / neoessentials.sell.bulk) Sell items for money
/payconfirmtoggle /payconfirmtoggle neoessentials.payconfirmtoggle Toggle payment confirmation prompts (registered by the item/misc commands module, not the economy module)

/pt name collision: /pt is also registered separately as the Powertool system's shorthand (/pt list, /pt remove, …, permission neoessentials.item.powertool — see the Items/Powertool docs). Because Brigadier merges same-named literal nodes registered on the same dispatcher, bare /pt still runs paytoggle (its .executes() was registered first and is kept), but /pt list / /pt remove run the Powertool subcommands, not anything paytoggle-related. Don't assume /pt <subcommand> is part of the paytoggle command.

Admin Commands#

Command Syntax Permission Description
/eco give /eco give <player> <amount> neoessentials.economy.eco Give money
/eco take /eco take <player> <amount> neoessentials.economy.eco Take money
/eco set /eco set <player> <amount> neoessentials.economy.eco Set balance
/eco reset /eco reset <player> neoessentials.economy.eco Reset to starting balance
/eco history [player] /eco history [player] none for self; op (level 2) for [player] View transaction history (own, or another player's)
/economy alias for /eco same Alias
/setworth /setworth <item\|hand> <price\|remove> neoessentials.setworth Set/remove an item's sell price

Note: /eco give\|take\|set take a plain numeric <amount> — percentage syntax (10%) is not supported.


ChestShop#

Sign-based shops that connect a chest to a sign for automated buy/sell.

Setup#

  1. Place a chest (double chests are supported — both sign-facing halves share the combined inventory, so two signs on the same double chest correctly draw from and restock into the full 54-slot inventory rather than each only seeing its own half)
  2. Place a sign on the chest (or adjacent block)
  3. Write the sign in this format:
Line 1: [leave blank or your name]   ← auto-assigns your name if blank
Line 2: 5                            ← quantity per trade
Line 3: B 10:S 5                     ← buy price : sell price  (B only, S only, or both)
Line 4: diamond                      ← item name, or ? to assign by right-clicking with item

Typing a name directly on line 4 only resolves a bare item ID — it can't carry enchantments, custom names, or modded NBT-backed data. Use ? (or shift+right-click afterward — see Item Data / NBT below) to assign the item by holding the exact stack instead, if it has data that needs to be preserved.

Price shortcuts: B FREE = free to buy · S FREE = free to sell · 1K = 1000 · 1.5M = 1500000

Admin Shops#

Use Admin Shop on line 1 — requires neoessentials.shop.create.admin. Admin shops have unlimited stock.

Item Data / NBT (Modded Items)#

Sign text alone can only encode a bare item ID (diamond, thermal:copper_ingot) — it cannot carry custom data (enchantments, custom names/lore, or a modded item's NBT-backed capability data). To make a shop trade an item with its data intact, assign it by holding the exact item and interacting with the sign/hologram rather than typing its name:

Gesture When it applies Effect
Right-click the sign/hologram while holding the item Sign's item line is ? (shop is "pending") One-time setup — captures the held item's data and activates the shop
Shift+right-click the sign/hologram while holding the item Shop already has an item assigned (including ones set by typing a name on the sign) Re-assigns the item, capturing its data — use this to attach/update NBT on an existing shop

Only the owner (or, for admin shops, a player with neoessentials.shop.create.admin) can do either. If a shop was created by typing an item name directly on the sign and buying/selling against a data-bearing item in the chest reports "out of stock" even though the chest visibly has stock, this is almost always the fix — the shop never captured the item's data, so it wasn't matching what's actually in the chest. Shift+right-click it with the correct item to fix.

Removing a Shop#

Left-click (attack) a shop sign to sell, same as always — but a single left-click swing on a shop sign is also the tool used to actually break it, so it's intercepted for the sell/info action by default. Sneak (shift) + left-click bypasses that interception and lets the swing through as a normal break attempt, removing the shop (if you're the owner or an admin).

Commands#

/chestshop (alias /cshop) with no arguments prints an in-game help listing.

Command Permission Description
/chestshop list [player] none (self) / neoessentials.shop.list.others (other player) List shops owned by you or another player
/chestshop info none Show info about the looked-at shop sign
/chestshop convert neoessentials.shop.create Register the looked-at (pre-existing) sign as a shop
/chestshop setprice <buy\|sell\|both> <price> shop owner, or neoessentials.shop.setprice / neoessentials.shop.admin.setprice Change the price(s) on the looked-at shop sign
/chestshop stats none Show your total shops, sales count, and top seller
/chestshop limit none Show how many shops you've placed vs. your shop.maxShopsPerPlayer limit
/chestshop pricing none Show whether the dynamic pricing engine is enabled and its rule count
/chestshop hologram enable shop owner (player shops), or neoessentials.shop.create.admin (admin shops) Enable a floating price hologram on the looked-at shop
/chestshop hologram disable shop owner (player shops), or neoessentials.shop.create.admin (admin shops) Remove the hologram from the looked-at shop
/chestshop hologram move <x> <y> <z> shop owner (player shops), or neoessentials.shop.create.admin (admin shops) Reposition the hologram (offset from the sign, ±4.5 blocks per axis)
/chestshop export neoessentials.shop.admin.csv.export Export all shops to a CSV file
/chestshop import [create] neoessentials.shop.admin.csv.import Import shops from CSV (create also creates new signs)
/chestshop remove shop owner, or neoessentials.shop.admin.remove / OP 3 Remove the shop you're currently looking at (sign or its linked chest)
/chestshop remove <x> <y> <z> neoessentials.shop.admin.remove Admin-only: remove a shop at specific coordinates, without needing to look at it
/chestshop reload neoessentials.shop.admin.reload Reload shop data and the dynamic pricing config

Dynamic Pricing & Holograms#

Shops support optional per-shop holograms (floating buy/sell display, clickable) and a configurable dynamic pricing engine (shop.pricing in config.json) with rules such as bulk-quantity discounts, time-based discounts, and supply/demand adjustment. These are off by default — /chestshop pricing reports current status.

Permissions#

Node Description
neoessentials.shop.create Create player shops / register signs via /chestshop convert
neoessentials.shop.create.admin Create admin shops
neoessentials.shop.use Buy/sell at shops
neoessentials.shop.list.others View other players' shops via /chestshop list <player>
neoessentials.shop.setprice Change prices on your own shops via /chestshop setprice
neoessentials.shop.admin.setprice Change prices on any shop
neoessentials.shop.admin.remove Remove any shop
neoessentials.shop.admin.reload Reload shop data
neoessentials.shop.admin.csv.export Export shops to CSV
neoessentials.shop.admin.csv.import Import shops from CSV

NPC Shops#

Entity-based shops — an invulnerable ArmorStand NPC that opens a virtual chest-style GUI listing configurable buy/sell offers, instead of a sign+chest pair. Unlike ChestShop, NPC shops have no linked chest: items are minted/sunk directly (like an admin ChestShop with unlimited stock), so there's no stock to run out of on the shop's side.

Setup#

  1. Stand where you want the NPC and run /npcshop create <name> — spawns the NPC at your current position.
  2. Add item listings with /npcshop additem <shopId> <item> <buyPrice> <sellPrice> <qty> (pass -1 for either price to disable that side of the trade — e.g. buy-only or sell-only listings).
  3. Right-click the NPC to open the shop GUI.

Buying and Selling#

Inside the shop GUI, each listing is shown as an item stack with buy/sell prices and a click hint in its lore:

  • Right-click a listing → buy (pay money, receive the item).
  • Left-click a listing → sell (give up the item, receive money) — only works if the listing has a sell price configured and you're carrying enough of the item.

Requires neoessentials.shop.use, same permission as ChestShop.

Commands#

/npcshop with no arguments prints an in-game help listing. All sub-commands require neoessentials.shop.npc.manage (or OP level 3).

Command Description
/npcshop create <name> Spawn a new NPC shop at your current position
/npcshop remove Remove the nearest NPC shop (within 5 blocks)
/npcshop additem <shopId> <item> <buyPrice> <sellPrice> <qty> Add a listing (-1 disables that side)
/npcshop removeitem <shopId> <index> Remove a listing by its index (see /npcshop info)
/npcshop list List all NPC shops
/npcshop info <shopId> Show a shop's name, ID, position, and listings
/npcshop reload Reload npc_shops.json from disk
/npcshop respawn <shopId> Re-summon a shop's NPC entity if it was ever lost (e.g. killed by void damage, or removed by an unrelated /kill) without losing its listings — the listings are keyed by shopId, independent of the in-world entity

shopId accepts either the full UUID or an unambiguous prefix (as shown by /npcshop list/create).

Permissions#

Node Description
neoessentials.shop.npc.manage Create/remove/configure NPC shops
neoessentials.shop.use Buy/sell at NPC shops (shared with ChestShop)

Vault API#

NeoEssentials registers itself as a Vault Economy, Chat, and Permission provider. Any mod/plugin using Vault will automatically use NeoEssentials.

Provider Class Notes
Economy NeoEssentialsEconomy Backed by EconomyManager; format() uses live currencySymbol
Chat NeoEssentialsChat Prefix/suffix routed through LuckPerms → FTBRanks → internal
Permission NeoEssentialsPermission playerHas() → PermissionAPI.hasPermission()

Use /vault to check provider status in-game.


Data Files#

File Contents
neoessentials/balances.json Player UUID → balance
neoessentials/transactions.json Transaction history log
neoessentials/worth.json Item ID → sell price
neoessentials/shops.json ChestShop data

Back to Wiki Home