适用于 Fabric 的完整服务端经济系统:包含余额、商店、玩家拍卖行和求购市场。所有功能均在服务端运行,因此你的玩家只需使用原版客户端即可加入,并通过常规箱子界面进行交互。无需安装客户端模组、代理或数据库,也无需任何配置。
支持在线模式和离线模式服务器,且无需额外配置。
功能特性
- ? 余额系统。 每位玩家都拥有独立账户。玩家可以互相转账,并查看实时排行榜。
- ? 商店。 通过简单的 JSON 文件按类别设置(每个类别一个文件)。支持购买、出售和“全部出售”,并显示累计总额。内置合理的默认值,安装后即可立即生效。
- ? 批量出售 (
/sell)。 将一堆物品放入网格中,在确认前即可查看每件物品的确切价值。窗口保持打开状态,以便你继续出售。
- ⚡ 快速购买。 每位玩家都可以为自己反复购买的商品构建一键购买界面,每个槽位可设置单个物品或整组物品。每次点击都会以当前最便宜的价格(涵盖商店和拍卖行)进行购买,并在点击前通过工具提示显示确切总价。
- ?️ 拍卖行。 由玩家运营的永不过期的直接购买列表。附魔、自定义名称及其他所有物品数据均保持原样。买家可以购买一组中的单个物品或整套物品,卖家仍可获得列出的全额价格。你购买或取消的物品会安全地存放在收集箱中,因此永远不会因背包已满而丢失物品。
- ? 求购市场。 发布你所需的物品请求及设定价格,其他玩家可通过完成订单来赚取金钱。
- ? 每日奖励。 每天首次登录时获得奖励。
- ☠️ 死亡惩罚。 一种可配置的货币消耗机制,当玩家死亡时触发。
- ? 经济控制(适用于大型服务器): 包括每日出售限制、仅出售玩家已卖给它的商品的商店,以及随供需关系变动的价格。所有这些选项默认均为关闭状态。
- ?️ 双击保护。 快速点击绝不会导致玩家被重复收费。
- ? 记分板集成。 保持
money 目标与记分板同步,以便侧边栏模组能够显示余额。
命令
| 命令 |
描述 |
/shop |
打开商店(购买、出售、全部出售、分页浏览) |
/sell |
打开批量出售窗口 |
/qb (或 /quickbuy) |
打开你的快速购买界面 |
/ah (或 /auction) |
打开拍卖行 |
/ah buy <name> |
打开拍卖行,筛选出名称匹配的物品 |
/ah sell <price> |
将你手中的物品列为直接购买(价格为整组价格) |
/ah claim |
从你的收集箱中领取物品 |
/orders |
打开求购市场(创建、查看、完成订单) |
/pay <player> <amount> |
向另一位玩家付款(带有确认界面) |
/baltop |
在聊天栏中显示余额最高的玩家(也可从服务器控制台使用) |
/balance [player], /money, /bal |
查看你自己的余额,或其他玩家的余额 |
/eco give|take|set <player> <amount> |
管理员。 调整余额 |
/shop enable <true|false> |
管理员。 关闭或重新开启出售功能 |
/shop reload |
管理员。 重新加载商店文件,无需重启服务器 |
快速购买
打开 /qb(或商店中的 ⚡ 按钮),按下 ✎ Edit(编辑),并从选择器中添加物品:任何可交易物品、自定义商店物品以及当前拍卖行上的所有物品均可添加。为每个槽位选择 单个 或 整组,然后 Save(保存)。此后每次购买只需点击一次,无需确认界面。
每次点击都会按件数从当前最便宜的来源购买物品,因此一次点击可能会从低价列表中获取 20 颗末影珍珠,从较贵的列表中获取 12 颗,其余部分则从商店购买。如果市场、你的余额或背包空间无法覆盖整组数量,该槽位会尽可能多地购买,并首先向你显示数量和价格。
配置
首次启动时,模组会将所需的所有内容写入 config/economy/ 和 config/orders/。无需手动设置。编辑 config/economy/config.json 进行调整:
{
"startingBalance": 15000,
"dailyRewardAmount": 2000,
"deathPenaltyPercentage": 2,
"maxBalance": 0,
"currencySymbol": "$"
}
将 dailyRewardAmount 或 deathPenaltyPercentage 设置为 0 可关闭相应功能,将 maxBalance 设置为 0 则表示无上限。
商店
在 config/economy/shop/ 中,每个类别对应一个 JSON 文件。首次启动时会生成一组默认值(包括建筑方块、木材、红石、陶瓦、贵重物品等),你可以自由编辑、添加或删除它们。运行 /shop reload 以应用更改。
{
"category_name": "Valuables",
"category_item": "minecraft:diamond",
"items": [
{
"id": "minecraft:diamond",
"can_buy": true,
"can_sell": true,
"quantity": 1,
"buy_price": 800,
"sell_price": 400
}
]
}
quantity 表示一次购买给予多少物品,因此你可以按组定价。请确保 buy_price(买入价)高于 sell_price(卖出价),否则玩家可以利用差价刷钱。
如果你希望出售数据包物品或自定义装备,物品还可以携带 components 块(自定义名称、描述、自定义数据)。
控制你的经济(可选)
如果你的服务器上金币堆积过多,任何商店物品上的这些额外字段可以帮助回收资金。除非你添加了它们,否则它们默认都是关闭的。
| 设置 |
作用 |
daily_sell_limit |
玩家每天可以全价出售的数量。在点击前会显示剩余数量。 |
stock_backed |
商店只能出售玩家已卖给它的物品。不会凭空创造物品。 |
sell_price_floor, sell_price_floor_at |
商店持有的物品越多,支付的价格越低。倾倒 500 颗钻石不再能像出售第一颗那样获得相同报酬。 |
buy_price_floor, buy_price_floor_at |
另一半逻辑。库存过剩的商店会以更低价格出售,从而再次清空积压库存。 |
此外,还有 /shop enable false,它会关闭出售功能但保留购买功能。玩家仍然可以花钱,但无法赚取更多金钱。
各版本功能对比
| 功能 |
1.0.0 (MC 1.21.11) |
1.1.0 (MC 26.2) |
1.2.0 (MC 26.3) |
| 平衡性调整、商店、拍卖行、挂单购买、每日奖励、死亡惩罚 |
✅ |
✅ |
✅ |
/sell、/shop enable、/shop reload、经济系统控制 |
❌ |
✅ |
✅ |
快速购买、购买拍卖列表中的部分物品、/ah buy <名称>、双击保护 |
❌ |
❌ |
✅ |
A complete server-side economy for Fabric: balances, a shop, a player auction house, and a buy-order market. Everything runs on the server, so your players join with a totally vanilla client and interact through normal chest menus. No client mod, no proxy, no database, no setup.
Works on both online-mode and offline-mode servers with no configuration.
Features
- ? Balances. Every player gets an account. They can pay each other and check a live leaderboard.
- ? Shop. Set it up with simple JSON files, one per category. Buy, sell, and Sell All, with a running total. Comes with sensible defaults so it works the moment you install it.
- ? Bulk selling with
/sell. Drop a pile of items into a grid and see exactly what everything is worth before you confirm. The window stays open so you can keep selling.
- ⚡ Quick Buy. Every player builds their own one-click buy screen for the things they buy over and over, one item or a full stack per slot. Each click pays the cheapest price available right now, across the shop and the auction house, and the tooltip shows the exact total before you click.
- ?️ Auction House. Player-run buy-now listings that never expire. Enchantments, custom names and all other item data are kept exactly as they were. Buyers can take one item from a stack or the whole lot, and the seller still gets the full listed price. Anything you buy or cancel waits safely in a collection box, so nothing is ever lost to a full inventory.
- ? Buy-Order Market. Post a request for items you want, at a price you set, and other players fill it for the money.
- ? Daily reward on the first login of each day.
- ☠️ Death penalty, a configurable money sink when players die.
- ? Economy controls for bigger servers: daily sell limits, a shop that only sells what players have sold to it, and prices that shift with supply. All optional and off by default.
- ?️ Double-click protection. A fast click can never charge a player twice.
- ? Scoreboard integration. Keeps a
money objective in sync so sidebar mods can display balances.
Commands
| Command |
Description |
/shop |
Open the shop (buy, sell, sell all, paginated) |
/sell |
Open the bulk sell window |
/qb (or /quickbuy) |
Open your Quick Buy screen |
/ah (or /auction) |
Open the auction house |
/ah buy <name> |
Open the auction house filtered to items matching a name |
/ah sell <price> |
List the item in your hand for buy-now (price is for the whole stack) |
/ah claim |
Claim items from your collection box |
/orders |
Open the buy-order market (create, view, fill) |
/pay <player> <amount> |
Pay another player (with a confirmation screen) |
/baltop |
Top balances in chat (also works from the server console) |
/balance [player], /money, /bal |
View your balance, or someone else's |
/eco give|take|set <player> <amount> |
Operators. Adjust a balance |
/shop enable <true|false> |
Operators. Turn selling off or back on |
/shop reload |
Operators. Reload shop files without restarting |
Quick Buy
Open /qb (or the ⚡ button in the shop), press ✎ Edit, and add items from the picker: anything tradeable, plus custom shop items and whatever is on the auction house right now. Choose one or a full stack for each slot, then Save. From then on it's one click per purchase, with no confirmation screen.
Every click buys item by item from whichever source is cheapest at that moment, so one click might take 20 Ender Pearls from a cheap listing, 12 from a pricier one, and the rest from the shop. If the market, your balance or your inventory space can't cover a whole stack, the slot buys as many as it can and shows you that amount and price first.
Configuration
On first launch the mod writes everything it needs to config/economy/ and config/orders/. There is no manual setup. Edit config/economy/config.json to tune it:
{
"startingBalance": 15000,
"dailyRewardAmount": 2000,
"deathPenaltyPercentage": 2,
"maxBalance": 0,
"currencySymbol": "$"
}
Set dailyRewardAmount or deathPenaltyPercentage to 0 to switch either off, and maxBalance to 0 for no cap.
The shop
One JSON file per category in config/economy/shop/. A set of defaults (building blocks, wood, redstone, terracotta, valuables and more) is written on first launch, and you can edit, add or delete them freely. Run /shop reload to apply your changes.
{
"category_name": "Valuables",
"category_item": "minecraft:diamond",
"items": [
{
"id": "minecraft:diamond",
"can_buy": true,
"can_sell": true,
"quantity": 1,
"buy_price": 800,
"sell_price": 400
}
]
}
quantity is how many items one purchase gives you, so you can price things by the stack. Keep buy_price above sell_price or players can farm the difference.
Items can also carry a components block (custom name, lore, custom data) if you want to sell datapack items or custom gear.
Controlling your economy (optional)
If money is piling up on your server, these extra fields on any shop item help pull it back. They are all off unless you add them.
| Setting |
What it does |
daily_sell_limit |
How many a player can sell per day at full price. They are shown how many they have left before they click. |
stock_backed |
The shop can only sell what players have sold to it. Nothing is created from nothing. |
sell_price_floor, sell_price_floor_at |
The more of an item the shop holds, the less it pays. Dumping 500 diamonds no longer pays the same as selling your first one. |
buy_price_floor, buy_price_floor_at |
The other half. An overstocked shop sells cheaper, which clears the backlog again. |
There is also /shop enable false, which switches off selling while leaving buying open. Players can still spend, but they cannot make more money.
Which version has what
| Feature |
1.0.0 (MC 1.21.11) |
1.1.0 (MC 26.2) |
1.2.0 (MC 26.3) |
| Balances, shop, auction house, buy orders, daily reward, death penalty |
✅ |
✅ |
✅ |
/sell, /shop enable, /shop reload, economy controls |
❌ |
✅ |
✅ |
Quick Buy, buying part of an auction listing, /ah buy <name>, double-click protection |
❌ |
❌ |
✅ |
评论 0
登录后参与评分
还没有评论,来抢沙发吧