DyMarket — 简化经济、拍卖与地产管理
每一枚硬币都有据可查。在一个拍卖行中交易物品。出租并出售你的土地。
DyMarket 是一款轻量级的经济插件,适用于生存服、SMP、Towny/Earth 和 Skyblock 服务器。它支持多种货币余额,安全地提供网页商店积分,运行拍卖行功能,并允许玩家出售或出租其 DyClaim 地块。只需一个 SQLite 文件,无需数据库服务器,且每个服务器构建版本仅需一个 JAR 包。
DyMarket 将多币种经济与 Vault 提供商、带有回滚功能的交易日志、用于网页商店和 RCON 的幂等积分桥接器、带有箱子 GUI 和完整命令路径的“立即购买”拍卖行,以及基于 DyClaim 的地产买卖与租赁功能结合在一起。1.1.0-BETA 版本带来了与 Dy 家族其他成员相同的命令、帮助页面和界面风格,拥有一个符合玩家预期的拍卖行,配备了员工工具,并可调节冷却时间。BETA(测试版)意味着在首次稳定发布之前细节可能仍会发生变化;DyMarket 会在每次启动时自动备份其数据文件。
1.1.0-BETA 新增内容
- 感觉如同家族一脉。 采用与 DyClaim 相同的
[DyMarket] 前缀样式,通过短页面提供帮助(/market help 2),所有员工命令均位于 /dymarket admin 下,并使用 /dyma 作为快捷方式。/market 和 /dym 打开与 /dymarket 相同的菜单,而 /economy (/eco) 仅包含员工的金钱相关命令。
- 错误自我解释。 错误的数量、货币或词汇现在会显示问题所在,然后提示正确的命令输入方式。TAB 补全建议在需要数量的地方提示数量,在需要货币的地方提示货币,且
/dyma give <player> credits 100 与 /dyma give <player> 100 credits 同样有效。
- 经典的拍卖行。 点击 Search 并在聊天中输入你想要的物品。底部栏包含排序、搜索、简短指南、你待售的物品和你的收藏箱。窗口标题不带颜色代码,因此即使在深色资源包下也保持可读性。员工可以直接从窗口中移除商品列表或更改价格。
- 简洁的数字。 新发布的商品、租赁和交易使用纯数字编号(如
#12),而非随机代码。
- 冷却时间。 支付、积分转账、兑换、拍卖销售和购买以及地产列表和购买之间的等待秒数,各项设置均在
cooldowns 下配置。拥有 dymarket.bypass.cooldown 权限可跳过这些冷却。
/dyma reset <player> [currency] 将余额重置为其初始金额。
为什么选择 DyMarket?
多种货币,一款插件。 money 和 credits 已预置,更多货币可在 config.yml 中添加。每种货币都有其独立的名称、符号、小数位数、数字格式、初始余额、最大余额和转账开关。一种货币通过 Vault 提供给其他插件,因此 DyHomes、DyRTP 及任何 Vault 插件都以其为计价单位。
不会丢失的资金。 没有任何操作可以创建负余额或超过 max-balance;此类操作将整体失败。两名玩家之间的转账会锁定双方账户,并且每次变更都会写入追加式交易日志,可通过 /dyma log 查看,并通过 /dyma rollback 进行回滚。
来自网页商店的积分。 Tebex、RCON 脚本和网页面板通过一条携带商店交易 ID 的控制台命令交付积分。相同的 ID 绝不会重复支付:重复提交会返回“已应用”,不做任何更改并正常退出,从而避免脚本重试。玩家之间可以互相发送积分,将其兑换为金钱,并可获得充值奖励。
不重复物品的拍卖行。 /ah 打开箱子 GUI;每个操作也都有对应的命令。物品在保存商品列表之前会从卖家手中移出,每个商品列表只能被购买一次,如果支付步骤失败,买家将获得退款。过期、取消和无法交付的物品会保留在收藏箱中。
能产生租金的土地。 配合 DyClaim 1.3.1 或更高版本,/estate 可出售或出租你所站立的关联地块。出售会将所有地块转移给买家;租赁则为租户提供有时限的 DyClaim 信任权限,默认情况下自动续期,若未支付租金则在宽限期结束后终止。
防止滥用。 对支付、积分转账以及拍卖和地产交易设置了可调的冷却时间和速率限制;大额支付和购买需要确认;当转账金额达到或超过 security.alert.transfer-above 时,会向员工发出警报。
轻松切换。 /dyma import essentials 复制 EssentialsX 的余额,/dyma import vault 复制当前注册在 Vault 中的经济系统的余额。DyMarket 中已经非零的余额不会被覆盖。
每个服务器构建仅需一个 JAR 包。 支持 Bukkit、Spigot、Paper、Purpur 和 Folia。在 Folia 上,物品的获取和交付在每个玩家自己的线程上进行,所有磁盘工作都在一个后台线程上运行,绝不在主线程或区域线程上执行。
五种语言。 英语、土耳其语、德语、西班牙语和俄语,根据玩家的 Minecraft 语言偏好或其自主选择。消息在所有位置接受 & 颜色代码,在 Paper、Purpur 和 Folia 上支持 MiniMessage 标签;玩家输入的名称和文本永远不会被解析为标签。
计划在未来的版本中推出:Bedrock 表单、竞价拍卖和买单、MySQL 及跨服务器支持。在 Bedrock 表单上线之前,Bedrock 玩家可使用命令路径,该路径涵盖所有 GUI 操作。
选择你的服务器构建
| 服务器 |
JAR 包 |
| Bukkit, Spigot, Paper, Purpur, Folia |
DyMarket-1.1.0-BETA.jar |
Java 17 字节码;请使用你的服务器所需的 Java 运行时环境。发行版列表:Minecraft 1.20.x 至 26.x。可选依赖:Vault(用于提供或使用 Vault 经济系统)、DyClaim 1.3.1 或更高版本(用于地产功能)、PlaceholderAPI 和 DyDiscord(自动检测;目前尚无员工警报 API)。SQLite 驱动程序随服务器一同提供;DyMarket 不捆绑任何库文件。
下载 · 更新日志
命令
| 命令 |
用途 |
/balance [player] [currency] |
显示你的余额,或另一名玩家的余额 |
/pay <player> <amount> [currency] [confirm] |
向玩家发送金钱 |
/baltop [currency] [page] |
余额排行榜 |
/credits |
显示你的积分 |
/credits send <player> <amount> |
向玩家发送积分 |
/credits exchange <amount> |
将积分兑换为金钱 |
/ah |
打开拍卖行 |
/ah sell <price> [currency] [amount] |
列出你主手物品 |
/ah list [page] |
浏览当前挂售列表 |
/ah search <text> |
搜索挂售列表 |
/ah info <id> |
显示一条挂售信息 |
/ah buy <id> [confirm] |
购买一条挂售信息 |
/ah mine |
你的挂售信息;可从此处取消 |
/ah cancel <id> |
取消你的一条挂售信息 |
/ah collect |
打开你的收藏箱 |
/estate sell <price> [currency] [here] |
将你所在的连接区域(claims)上架出售 |
/estate rent <price> <days> [currency] [here] |
提供租赁服务,价格为每 <days> 天一段的价格 |
/estate unlist [id] |
下架你的挂售信息 |
/estate list [page] |
浏览地产挂售列表 |
/estate info [id] |
显示一条挂售信息,或你所在位置的挂售信息 |
/estate buy [id] [confirm] |
购买一条出售中的地产 |
/estate lease [id] [confirm] |
租赁一条出租中的地产 |
/estate autorenew [id] |
开启或关闭租约自动续期 |
/estate leave [id] [confirm] |
立即终止你的租约,不退款 |
/estate evict [id] |
在已支付期限结束时终止租户的租约 |
/estate mine |
你的挂售信息和租约 |
/dymarket help [page] |
分页显示你可用的命令 |
/dymarket language <auto/en/tr/de/es/ru> |
保存你的语言设置;从控制台设置服务器语言 |
/dymarket admin [page] |
管理员帮助;/dyma 是其快捷方式 |
/dyma give <player> <amount> [currency] [txid] |
增加余额;带有 txid 时仅能操作一次 |
/dyma take <player> <amount> [currency] |
从余额中扣除 |
/dyma set <player> <amount> [currency] |
设置余额 |
/dyma reset <player> [currency] |
将余额重置为初始金额(未指定货币时重置所有货币) |
/dyma log <player> [page] |
显示玩家的交易记录 |
/dyma rollback <id> [force] |
撤销一笔交易 |
/dyma merge <from> <to> |
合并两个账户 |
/dyma import <essentials/vault> |
从 EssentialsX 或当前的 Vault 经济系统中复制余额 |
/dyma ah remove <id> |
移除任意拍卖挂售信息 |
/dyma ah price <id> <price> |
更改任意拍卖挂售信息的价格 |
/dyma ah purge <player> |
移除某玩家的所有拍卖挂售信息 |
/dyma estate unlist <id> |
下架任意地产挂售信息 |
/dyma language <auto/en/tr/de/es/ru> |
为所有人设置语言 |
/dyma reload |
验证并重新加载配置与消息 |
/economy <give/take/set/reset/log/rollback/merge/import> ... |
不含其余管理菜单的纯金钱命令,适用于拥有 dymarket.admin.economy 权限的管理员;/eco 是其快捷方式 |
/bal 和 /money 同样会打开 /balance,/balancetop 是 /baltop 的别名,/credit 是 /credits 的别名,/auction 和 /auctionhouse 是 /ah 的别名,/realestate 是 /estate 的别名,而 /market 和 /dym 与 /dymarket 相同。单独输入 /dymarket 会显示帮助信息,而 /dyma <command> 等同于 /dymarket admin <command>。直接在 /dymarket 后输入的管理员命令(例如由网络商店使用的 /dymarket give)仍然有效。金额支持 1k 和 2.5m 格式,以及对应语言的数字格式,例如在 en-US 下为 1,250.50,在 tr-TR 下为 1.250,50。
/pay 在金额达到或超过 pay.confirm-above 时会要求确认,/ah buy 在 auction.confirm-purchase 开启时也会要求确认。/estate buy、/estate lease 和 /estate leave 始终会先要求确认。每个命令都会打印出包含 confirm 的完整命令以便重复执行;在 GUI 界面中,确认窗口也会执行相同的操作。
- 在拍卖行中,Search(搜索)会提示你在聊天栏中输入搜索内容(输入
cancel 可中止);不带文本参数使用 /ah search 也会触发此行为。
/estate sell 和 /estate rent 接受 here 参数以仅列出你当前所在的区块。若未指定 id,/estate unlist、info、buy 和 lease 会使用你所在的挂售信息;autorenew、leave 和 evict 会使用你所在的租约,或你唯一的租约。
/dyma rollback 需要传入由 /dyma log 显示的交易日志编号。当回滚会导致余额变为负数时会被拒绝;加上 force 参数则会在余额归零时停止。
权限
| 权限 |
默认值 |
用途 |
dymarket.player |
true |
所有默认值为 true 的下方玩家权限 |
dymarket.balance |
true |
/balance |
dymarket.balance.others |
op |
其他玩家的余额 |
dymarket.pay |
true |
/pay |
dymarket.baltop |
true |
/baltop |
dymarket.baltop.hidden |
false |
将该玩家排除在 /baltop 之外 |
dymarket.credits |
true |
/credits |
dymarket.credits.send |
true |
/credits send |
dymarket.credits.exchange |
true |
/credits exchange |
dymarket.ah |
true |
浏览和购买拍卖行物品,管理你的上架列表 |
dymarket.ah.sell |
true |
/ah sell |
dymarket.estate |
true |
浏览、购买和租赁地产 |
dymarket.estate.sell |
true |
/estate sell |
dymarket.estate.rent |
true |
/estate rent |
dymarket.admin |
op |
/dyma、/dyma reload 和 /dyma language(全局语言设置) |
dymarket.admin.economy |
op |
give、take、set、reset、log、rollback、merge、import |
dymarket.admin.ah |
op |
取消、移除或重新定价任何上架(也可在 /ah 中通过 Shift+点击操作),清除玩家的上架记录 |
dymarket.admin.estate |
op |
下架任何地产上架 |
dymarket.admin.alerts |
op |
可疑转账警报和更新通知 |
dymarket.ah.limit.<n> |
not set |
活跃拍卖上架数量;取最高值,覆盖 auction.max-listings |
dymarket.ah.limit.unlimited |
op |
无拍卖上架限制 |
dymarket.estate.limit.<n> |
not set |
活跃地产上架数量;取最高值。若无此设置则无地产限制 |
dymarket.estate.limit.unlimited |
op |
无地产上架限制 |
dymarket.ah.tax.<percent> |
not set |
拍卖税率;取最低值,覆盖 auction.tax-percent |
dymarket.bypass.ratelimit |
op |
跳过 /pay、/credits send 和拍卖购买的速率限制 |
dymarket.bypass.cooldown |
op |
跳过 cooldowns 下设置的所有冷却时间 |
dymarket.bypass.tax |
false |
该玩家上架的物品免收拍卖或地产税 |
baltop.exclude-permission 指定将玩家从 /baltop 中隐藏的权限名称(默认为 dymarket.baltop.hidden)。
占位符
使用 PlaceholderAPI:
| 占位符 |
显示内容 |
%dymarket_balance% |
Vault 货币的余额,纯数字格式 |
%dymarket_balance_formatted% |
同上,带货币符号格式化 |
%dymarket_balance_<currency>% |
任意货币的余额,纯数字格式 |
%dymarket_balance_<currency>_formatted% |
同上,已格式化 |
%dymarket_credits% |
积分,已格式化 |
%dymarket_baltop_<n>_name% |
Vault 货币排行榜第 <n> 位的玩家名称 |
%dymarket_baltop_<n>_amount% |
该排名的格式化余额 |
%dymarket_baltop_<currency>_<n>_name% |
其他货币排行榜第 <n> 位的玩家名称 |
%dymarket_baltop_<currency>_<n>_amount% |
该排名的格式化余额 |
%dymarket_ah_listings% |
活跃的拍卖上架数量 |
%dymarket_ah_mine% |
该玩家活跃的拍卖上架数量 |
%dymarket_estate_listings% |
开放出售或租赁的地产上架数量 |
占位符的值从内存中获取:已加载账户的玩家余额,以及上次刷新时的排行榜数据(由 baltop.refresh-seconds 控制)。当模块关闭时,市场计数为 0。
配置亮点
每个功能在 config.yml 中都有独立的开关。缺失的设置会在启动和重载时自动添加;无效的值会导致重载失败并保留当前运行中的设置。
货币。 currencies 下的每个条目代表一种货币。vault: true 标记通过 Vault 提供的货币(必须且只能有一个)。provider: internal 将余额存储在 DyMarket 中;provider: vault 则使用该插件之外的另一个 Vault 经济插件来处理该货币,此时 DyMarket 不会注册自己的经济系统。
currencies:
money:
enabled: true
name: Money
plural: Money
symbol: "$"
symbol-after: false
decimals: 2
format-locale: en-US # tr-TR 会显示为 1.250,50
starting-balance: 100.0
max-balance: 1000000000.0
transferable: true
vault: true
provider: internal
积分桥接。 在玩家完成购买后,让你的网店或面板运行此控制台命令。它支持通过 RCON 和 Tebex、LeaderOS 以及任何支持占位符命令的商店执行:
dymarket give {player} {amount} credits {transaction_id}
交易 ID 确保了交付的幂等性:如果商店重复发送相同的购买请求,DyMarket 会响应称该请求已处理过,不会进行任何更改。credits.topup-bonus-percent 为每次带有 ID 的充值添加额外积分,credits.announce-topups 用于广播这些充值信息。credits.exchange.rate 设置一个积分可兑换多少货币(默认为 1000),credits.exchange.min 设置最小兑换额。
冷却时间。 玩家两次使用某项操作之间等待的秒数,每项操作独立设置;设为 0 表示无冷却,小数也有效。当玩家离开服务器再重新加入时,正在进行的冷却计时会被保留,而 dymarket.bypass.cooldown 权限可跳过所有冷却。
cooldowns:
pay: 3
credits-send: 5
credits-exchange: 3
ah-sell: 3
ah-buy: 1
estate-list: 10
estate-buy: 5
支付与安全。 pay.min-amount 设置最小支付金额,pay.confirm-above 设置需要确认的金额阈值(设为 0 则从不要求确认)。security.rate-limit.pay-per-minute(10,适用于 /pay 和 /credits send)和 security.rate-limit.ah-buy-per-minute(20);设为 0 表示关闭该限制。等于或高于 security.alert.transfer-above 的支付、Vault 支付、拍卖销售和地产销售/租赁将在控制台输出,并通知拥有 security.alert.notify-permission 权限的在线玩家。security.alert.discord 专为 DyDiscord 预留:由于 DyDiscord 目前尚无员工警报 API,DyMarket 仅在启动时记录一行日志,警报仍留在游戏内和控制台中。
拍卖。 auction.duration-hours(48)、auction.tax-percent(5.0;税款离开经济系统)、auction.min-price 和 auction.max-price、auction.max-listings(7;0 表示无限制;dymarket.ah.limit.<n> 可覆盖此设置)、auction.currency 和 auction.allowed-currencies、auction.confirm-purchase、auction.broadcast-sales、物品 auction.blacklist、auction.block-items-with-lore-containing、auction.gui.rows 以及 auction.gui.sort(newest、price-asc 或 price-desc)。税率在物品上架时固定,取自 auction.tax-percent 或卖家最低的 dymarket.ah.tax.<n>,因此后续更改不会影响正在进行的挂牌。收藏箱会保留带有原因的物品:EXPIRED(已过期)、CANCELLED(已取消)、REMOVED(由工作人员移除)、FULL_INVENTORY(买家背包已满)或 PURCHASE(买家在交付前离开)。
地产。 需要 DyClaim 1.3.1 或更高版本;如果使用旧版 DyClaim 或未安装 DyClaim,地产模块会在控制台输出一行信息后自行关闭,而 DyMarket 的其他部分仍会继续工作。一个挂牌涵盖你站立所在区块周围连接的领地群组,最多可达 estate.max-chunks-per-listing(64)个区块。除非玩家拥有 dymarket.estate.limit.<n> 权限,否则地产挂牌没有数量限制。地产税来自 estate.tax-percent(仅 dymarket.bypass.tax 可更改它),并在领地挂牌时固定。
estate:
enabled: true
currency: money
allowed-currencies: [money, credits]
max-chunks-per-listing: 64
tax-percent: 5.0
sale:
enabled: true
min-price: 1.0
max-price: 1000000000.0
rent:
enabled: true
min-days: 1
max-days: 90
rights: [build, containers, doors, trapdoors, redstone, entities, teleport]
grace-hours: 24
refund-on-owner-cancel-percent: 100
check-interval-minutes: 10
listing-expires-days: 30 # 0 = 永不
出租挂牌期间,其他玩家将无法使用该地块。新租赁开始时默认开启自动续租;使用 /estate autorenew 可以关闭或重新开启。当租约到期且续租开启时,将收取下一期的费用;如果扣款失败或续租已关闭,租约将进入 grace-hours 规定的宽限期,之后信任关系将被移除,租约结束。系统会立即或在双方下次加入服务器时通知双方。当所有者下架出租的地产,或其包含的某个领地被移除或转移至 DyClaim 中的其他位置时,租约终止,所有者需向租户支付未使用时间的 refund-on-owner-cancel-percent 作为退款;若所有者无法支付该笔退款,则无法下架地产;若由工作人员强制移除,则支付所有者账户中现有的金额。DyClaim 自带的市场可以与 DyMarket 并存;两者相互独立,而 DyMarket 是功能更丰富的选项。
面向开发者
dev.dymarket.api.DyMarketAPI 以主要单位(BigDecimal)读取和更改余额。getBalance(UUID, currency) 返回余额。deposit、withdraw 和 transfer 在 DyMarket 的 IO 线程上运行,并返回 CompletableFuture<TransactionResult>;depositSync、withdrawSync 和 transferSync(分别命名为 trySyncDeposit、trySyncWithdraw 和 trySyncTransfer)则在调用线程上直接返回结果。每项更改都会为交易日志添加备注。getCurrencies()、getAuctionListings()、getEstateListings() 和 getLeases(UUID) 返回内存中的快照,在任何线程上均安全。
事件:BalanceChangeEvent(可取消,在请求它的线程上变更发生前触发)、AuctionListEvent、AuctionPurchaseEvent 和 AuctionCancelEvent(可取消)、AuctionExpireEvent(事后触发,在 IO 线程上)、EstateListEvent、EstateSaleEvent 和 EstateLeaseStartEvent(可取消)以及 EstateLeaseEndEvent(事后触发,附带原因)。请先添加 softdepend: [DyMarket] 并检查 DyMarketAPI.isAvailable()。其他插件也可以通过 Vault 经济 API 使用 DyMarket。
针对离线玩家的同步调用或 Vault 调用,若其账户不在内存中,将等待 IO 线程加载该账户,最长等待时间为 10 秒。这种情况很少见,因为在线玩家和最近使用过的账户(最多 10,000 个)会保留在内存中。
数据与升级
所有内容存储在一个 SQLite 文件 plugins/DyMarket/data.db(storage.file)中,包含以下表:accounts、transactions、auction_listings、collect_box、estate_listings、estate_leases、players(名称和语言选择)、notices(等待离线玩家的消息)和 meta(架构版本)。每次启动时,在打开文件之前,DyMarket 会将其复制到 plugins/DyMarket/backups/data-<date>.db,并保留最近的七个副本。余额保存在内存中,并按 storage.flush-inticks 指定的间隔在后台写入;所有待写入的数据会在服务器停止时一并写入。磁盘操作永远不会在主线程或区域线程上运行。如果服务器没有 SQLite 驱动程序,或者无法打开文件,DyMarket 将在控制台输出一行信息并自行关闭。
当前文件架构为第 1 版;自首个构建以来新增的列(拍卖和地产挂牌及租约的固定税率、租约所有者姓名和驱逐标志)会在启动时原位添加。后续版本会自动转换文件,但由新版 DyMarket 写入的文件会被拒绝而非修改。
缺失的设置项和消息键会在启动和重载时自动添加,不会触碰你的自定义编辑。DyMarket 每六小时检查一次 Modrinth 以获取新版本,并向拥有 dymarket.admin.alerts 权限的玩家发出提示;设置 updates.check: false 可关闭此功能。匿名 bStats 统计信息可通过 metrics.enabled: false 关闭。
构建
gradle clean build
需要 Gradle 9.1 配合 Java 21 或 25。生成的 JAR 文件为 build/libs/DyMarket-1.1.0-BETA.jar。99 个测试使用 JUnit 和 Mockito,不包含在 JAR 文件中。
许可证
DyMarket 源码可用许可证 1.0,与 DyClaim、DyRTP、DyHomes 和 DyDiscord 条款相同:可在任何服务器上免费使用和修改,禁止付费分发,且分发版本必须共享其源代码。这是一种自定义的源码可用许可证,而非 OSI 批准的开源许可证。详见 LICENSE。
开始使用
- 将
DyMarket-1.1.0-BETA.jar 放入 plugins/ 目录(需搭配 Vault,若使用庄园功能则需 DyClaim 1.3.1 或更高版本),然后启动服务器。
- 从 EssentialsX 或其他 Vault 经济插件迁移?运行一次
/dyma import essentials 或 /dyma import vault。
- 将你的网络商店的交付命令指向
dymarket give {player} {amount} credits {transaction_id}。
- 调整
config.yml(货币、拍卖税、庄园租金)并运行 /dyma reload。
源码与支持
Documentation · Report an issue · License
By Claww / DyPlugin.
DyMarket — Economy, Auctions and Estate Made Simple
Keep every coin accounted for. Trade items in one auction house. Rent and sell your land.
DyMarket is one light economy plugin for survival, SMP, Towny/Earth and Skyblock servers. It keeps balances in several currencies, delivers web-store credits safely, runs an auction house and lets players sell or rent their DyClaim land, with one SQLite file, no database server and one JAR for every server build.
DyMarket combines a multi-currency economy with a Vault provider, a transaction log with rollback, an idempotent credits bridge for webstores and RCON, a buy-it-now auction house with a chest GUI and a full command path, and estate sale and rent on top of DyClaim. Version 1.1.0-BETA brings the same commands, help pages and look as the rest of the Dy family, an auction house that works the way players expect, with tools for staff, and adjustable cooldowns. BETA means details may still change before the first stable release; DyMarket backs up its data file automatically on every start.
New in 1.1.0-BETA
- Feels like the rest of the family. The same
[DyMarket] prefix style as DyClaim, help in short pages (/market help 2) and every staff command under /dymarket admin, with /dyma as its shortcut. /market and /dym open the same menu as /dymarket, and /economy (/eco) holds only the money commands for staff.
- Mistakes explain themselves. A wrong amount, currency or word now shows the problem and then the right way to type the command. TAB suggests amounts where an amount goes and currencies only after it, and
/dyma give <player> credits 100 works as well as /dyma give <player> 100 credits.
- A classic auction house. Click Search and type what you want in chat. The bottom bar holds sort, search, a short guide, your items for sale and your collection box. Window titles carry no colour code, so they stay readable with dark resource packs too. Staff can remove a listing or change its price straight from the window.
- Short numbers. New listings, leases and transactions get plain numbers (
#12) instead of random codes.
- Cooldowns. Seconds to wait between payments, credit transfers, exchanges, auction sales and purchases and estate listings and purchases, each set under
cooldowns. dymarket.bypass.cooldown skips them.
/dyma reset <player> [currency] puts a balance back to its starting amount.
Why DyMarket?
Several currencies, one plugin. money and credits come ready, and more can be added in config.yml. Each currency has its own name, symbol, decimals, number format, starting balance, maximum balance and transfer switch. One currency is served to other plugins through Vault, so DyHomes, DyRTP and any Vault plugin charge their prices in it.
Money that cannot go missing. No operation can create a negative balance or go over max-balance; such an operation fails as a whole. Transfers between two players lock both accounts, and every change is written to an append-only transaction log that /dyma log shows and /dyma rollback reverses.
Credits from your webstore. Tebex, RCON scripts and web panels deliver credits with one console command that carries the store's transaction ID. The same ID is never paid twice: a repeat returns "already applied", changes nothing and exits without error, so scripts do not retry. Players send credits to each other, exchange them for money and can get a top-up bonus.
An auction house that does not duplicate items. /ah opens a chest GUI; every action also has a command. The item leaves the seller's hand before the listing is saved, a listing can only be bought once, and if a payment step fails the buyer is refunded. Expired, cancelled and undeliverable items wait in a collection box.
Land that earns rent. With DyClaim 1.3.1 or later, /estate sells or rents the connected claims you stand in. A sale transfers every claim to the buyer; rent gives the tenant timed DyClaim trust, renews automatically (on by default) and ends after a grace period when the rent is not paid.
Safe against abuse. Adjustable cooldowns and rate limits on payments, credit transfers and auction and estate trades, confirmations for large payments and purchases, and an alert to staff for transfers at or above security.alert.transfer-above.
Easy switch. /dyma import essentials copies EssentialsX balances, and /dyma import vault copies balances from the economy currently registered in Vault. Nothing that is already non-zero in DyMarket is overwritten.
One JAR for every server. Bukkit, Spigot, Paper, Purpur and Folia. On Folia, items are taken and delivered on each player's own thread, and all disk work runs on one background thread, never on the main or a region thread.
Five languages. English, Turkish, German, Spanish and Russian, picked from the player's Minecraft language or their own choice. Messages accept & colour codes everywhere and MiniMessage tags on Paper, Purpur and Folia; names and text typed by players are never read as tags.
Planned for later releases: Bedrock forms, bidding auctions and buy orders, MySQL and cross-server support. Until Bedrock forms arrive, Bedrock players use the command path, which covers every GUI action.
Choose your server build
| Server |
JAR |
| Bukkit, Spigot, Paper, Purpur, Folia |
DyMarket-1.1.0-BETA.jar |
Java 17 bytecode; use the Java runtime your server needs. Release listing: Minecraft 1.20.x through 26.x. Optional: Vault (to serve or use a Vault economy), DyClaim 1.3.1 or later (estate), PlaceholderAPI and DyDiscord (detected; it has no staff-alert API yet). The SQLite driver comes with the server; DyMarket bundles no libraries.
Downloads · Changelog
Commands
| Command |
Purpose |
/balance [player] [currency] |
Show your balance, or another player's |
/pay <player> <amount> [currency] [confirm] |
Send money to a player |
/baltop [currency] [page] |
Top balances |
/credits |
Show your credits |
/credits send <player> <amount> |
Send credits to a player |
/credits exchange <amount> |
Exchange credits for money |
/ah |
Open the auction house |
/ah sell <price> [currency] [amount] |
List the item in your main hand |
/ah list [page] |
Browse the active listings |
/ah search <text> |
Search the listings |
/ah info <id> |
Show one listing |
/ah buy <id> [confirm] |
Buy a listing |
/ah mine |
Your listings; cancel from here |
/ah cancel <id> |
Cancel one of your listings |
/ah collect |
Open your collection box |
/estate sell <price> [currency] [here] |
Put the connected claims you stand in up for sale |
/estate rent <price> <days> [currency] [here] |
Offer them for rent, priced per period of <days> |
/estate unlist [id] |
Take your listing down |
/estate list [page] |
Browse estate listings |
/estate info [id] |
Show a listing, or the one you stand in |
/estate buy [id] [confirm] |
Buy a sale listing |
/estate lease [id] [confirm] |
Rent a rent listing |
/estate autorenew [id] |
Turn automatic renewal of your lease on or off |
/estate leave [id] [confirm] |
End your lease now, without a refund |
/estate evict [id] |
End your tenant's lease when the paid period ends |
/estate mine |
Your listings and leases |
/dymarket help [page] |
Show the commands you may use, a page at a time |
/dymarket language <auto/en/tr/de/es/ru> |
Save your language; from the console, set the server language |
/dymarket admin [page] |
The staff help; /dyma is its shortcut |
/dyma give <player> <amount> [currency] [txid] |
Add to a balance; with a txid, at most once |
/dyma take <player> <amount> [currency] |
Take from a balance |
/dyma set <player> <amount> [currency] |
Set a balance |
/dyma reset <player> [currency] |
Put a balance back to the starting amount (every currency when none is named) |
/dyma log <player> [page] |
Show a player's transactions |
/dyma rollback <id> [force] |
Reverse a transaction |
/dyma merge <from> <to> |
Merge two accounts |
/dyma import <essentials/vault> |
Copy balances from EssentialsX or the current Vault economy |
/dyma ah remove <id> |
Remove any auction listing |
/dyma ah price <id> <price> |
Change the price of any auction listing |
/dyma ah purge <player> |
Remove every auction listing of a player |
/dyma estate unlist <id> |
Take down any estate listing |
/dyma language <auto/en/tr/de/es/ru> |
Set the language for everyone |
/dyma reload |
Validate and reload settings and messages |
/economy <give/take/set/reset/log/rollback/merge/import> ... |
The same money commands without the rest of the admin menu, for staff with dymarket.admin.economy; /eco is its shortcut |
/bal and /money also open /balance, /balancetop is /baltop, /credit is /credits, /auction and /auctionhouse are /ah, /realestate is /estate, and /market and /dym are the same as /dymarket. /dymarket alone shows the help, and /dyma <command> is the same as /dymarket admin <command>. Admin commands typed straight after /dymarket (such as /dymarket give, used by webstores) keep working. Amounts accept 1k and 2.5m, and the currency's number format, such as 1,250.50 under en-US or 1.250,50 under tr-TR.
/pay asks for confirm at or above pay.confirm-above, and /ah buy asks for it when auction.confirm-purchase is on. /estate buy, /estate lease and /estate leave always ask first. Each prints the exact command to repeat with confirm; in the GUIs a confirmation window does the same.
- In the auction house, Search asks you to type the search in chat (
cancel stops it); /ah search without text does the same.
/estate sell and /estate rent take here to list only the chunk you stand in. Without an id, /estate unlist, info, buy and lease use the listing you stand in; autorenew, leave and evict use the lease you stand in, or your only lease.
/dyma rollback takes the transaction number shown by /dyma log. It refuses when the reversal would make a balance negative; force stops at zero instead.
Permissions
| Permission |
Default |
Purpose |
dymarket.player |
true |
Every player permission below that defaults to true |
dymarket.balance |
true |
/balance |
dymarket.balance.others |
op |
Other players' balances |
dymarket.pay |
true |
/pay |
dymarket.baltop |
true |
/baltop |
dymarket.baltop.hidden |
false |
Leave this player out of /baltop |
dymarket.credits |
true |
/credits |
dymarket.credits.send |
true |
/credits send |
dymarket.credits.exchange |
true |
/credits exchange |
dymarket.ah |
true |
Browse and buy in the auction house, manage your listings |
dymarket.ah.sell |
true |
/ah sell |
dymarket.estate |
true |
Browse, buy and rent estate |
dymarket.estate.sell |
true |
/estate sell |
dymarket.estate.rent |
true |
/estate rent |
dymarket.admin |
op |
/dyma, /dyma reload and /dyma language (the language for everyone) |
dymarket.admin.economy |
op |
give, take, set, reset, log, rollback, merge, import |
dymarket.admin.ah |
op |
Cancel, remove or reprice any listing (also with Shift-clicks in /ah), purge a player's listings |
dymarket.admin.estate |
op |
Take down any estate listing |
dymarket.admin.alerts |
op |
Suspicious-transfer alerts and update notices |
dymarket.ah.limit.<n> |
not set |
Active auction listings; the highest wins over auction.max-listings |
dymarket.ah.limit.unlimited |
op |
No auction listing limit |
dymarket.estate.limit.<n> |
not set |
Active estate listings; the highest wins. Without one there is no estate limit |
dymarket.estate.limit.unlimited |
op |
No estate listing limit |
dymarket.ah.tax.<percent> |
not set |
Auction tax; the lowest wins over auction.tax-percent |
dymarket.bypass.ratelimit |
op |
Skip the rate limits on /pay, /credits send and auction purchases |
dymarket.bypass.cooldown |
op |
Skip every wait set under cooldowns |
dymarket.bypass.tax |
false |
No auction or estate tax on what this player lists |
baltop.exclude-permission names the permission that hides players from /baltop (dymarket.baltop.hidden by default).
Placeholders
With PlaceholderAPI:
| Placeholder |
Shows |
%dymarket_balance% |
Balance in the Vault currency, as a plain number |
%dymarket_balance_formatted% |
The same, formatted with the currency symbol |
%dymarket_balance_<currency>% |
Balance in any currency, as a plain number |
%dymarket_balance_<currency>_formatted% |
The same, formatted |
%dymarket_credits% |
Credits, formatted |
%dymarket_baltop_<n>_name% |
Name at rank <n> of the Vault currency's top list |
%dymarket_baltop_<n>_amount% |
Formatted balance at that rank |
%dymarket_baltop_<currency>_<n>_name% |
Name at rank <n> of another currency's top list |
%dymarket_baltop_<currency>_<n>_amount% |
Formatted balance at that rank |
%dymarket_ah_listings% |
Active auction listings |
%dymarket_ah_mine% |
The player's active auction listings |
%dymarket_estate_listings% |
Estate listings open for sale or rent |
Placeholders are answered from memory: balances of players whose account is loaded, and the top list as of its last refresh (baltop.refresh-seconds). The market counts are 0 while their module is off.
Configuration highlights
Every feature has its own switch in config.yml. Missing settings are added on start and reload; an invalid value rejects the reload and keeps the running settings.
Currencies. Each entry under currencies is one currency. vault: true marks the one currency served through Vault (exactly one may have it). provider: internal keeps the balances in DyMarket; provider: vault uses another plugin's Vault economy for that currency instead, and DyMarket then does not register its own.
currencies:
money:
enabled: true
name: Money
plural: Money
symbol: "$"
symbol-after: false
decimals: 2
format-locale: en-US # tr-TR gives 1.250,50
starting-balance: 100.0
max-balance: 1000000000.0
transferable: true
vault: true
provider: internal
Credits bridge. Let your webstore or panel run this console command when a purchase completes. It works over RCON and with Tebex, LeaderOS and any store that runs a command with placeholders:
dymarket give {player} {amount} credits {transaction_id}
The transaction ID makes the delivery idempotent: if the store sends the same purchase again, DyMarket answers that it was already applied and changes nothing. credits.topup-bonus-percent adds extra credits to each delivery with an ID, and credits.announce-topups announces them. credits.exchange.rate sets how much money one credit buys (1000 by default), credits.exchange.min the smallest exchange.
Cooldowns. Seconds a player waits between two uses of an action, each set on its own; 0 means no wait and decimals work. A running wait is kept when the player leaves and rejoins, and dymarket.bypass.cooldown skips them all.
cooldowns:
pay: 3
credits-send: 5
credits-exchange: 3
ah-sell: 3
ah-buy: 1
estate-list: 10
estate-buy: 5
Payments and security. pay.min-amount, and pay.confirm-above asks for a confirmation at or above an amount (0 never asks). security.rate-limit.pay-per-minute (10, shared by /pay and /credits send) and security.rate-limit.ah-buy-per-minute (20); 0 turns a limit off. Payments, Vault payments, auction sales and estate sales and rent at or above security.alert.transfer-above are shown in the console and to online players with security.alert.notify-permission. security.alert.discord is reserved for DyDiscord: DyDiscord has no staff-alert API yet, so DyMarket logs one line at start and the alerts stay in game and in the console.
Auction. auction.duration-hours (48), auction.tax-percent (5.0; tax leaves the economy), auction.min-price and auction.max-price, auction.max-listings (7; 0 means no limit; dymarket.ah.limit.<n> overrides it), auction.currency and auction.allowed-currencies, auction.confirm-purchase, auction.broadcast-sales, an item auction.blacklist, auction.block-items-with-lore-containing, auction.gui.rows and auction.gui.sort (newest, price-asc or price-desc). The tax is fixed when the item is listed, from auction.tax-percent or the seller's lowest dymarket.ah.tax.<n>, so a later change does not touch running listings. The collection box keeps items with a reason: EXPIRED, CANCELLED, REMOVED (by staff), FULL_INVENTORY (the buyer's inventory was full) or PURCHASE (the buyer left before delivery).
Estate. Needs DyClaim 1.3.1 or later; with an older DyClaim or none, the estate module turns itself off with one console line and the rest of DyMarket keeps working. A listing covers the connected group of your claims around the chunk you stand in, up to estate.max-chunks-per-listing (64) chunks. There is no estate listing limit unless a player has dymarket.estate.limit.<n>. The estate tax comes from estate.tax-percent (only dymarket.bypass.tax changes it) and is fixed when the claims are listed.
estate:
enabled: true
currency: money
allowed-currencies: [money, credits]
max-chunks-per-listing: 64
tax-percent: 5.0
sale:
enabled: true
min-price: 1.0
max-price: 1000000000.0
rent:
enabled: true
min-days: 1
max-days: 90
rights: [build, containers, doors, trapdoors, redstone, entities, teleport]
grace-hours: 24
refund-on-owner-cancel-percent: 100
check-interval-minutes: 10
listing-expires-days: 30 # 0 = never
Renting a listing closes it to other players for as long as the lease runs. A new lease starts with automatic renewal on; /estate autorenew turns it off and on. When a lease is due and renewal is on, the next period is charged; if that fails, or renewal is off, the lease enters a grace period of grace-hours, after which the trust is removed and the lease ends. Both sides are told, now or on their next join. When the owner takes a rented listing down, or a claim in it is removed or transferred in DyClaim, the lease ends and the owner pays the tenant refund-on-owner-cancel-percent of the unused time; an owner who cannot pay that refund cannot unlist, and a staff removal pays what the owner has. DyClaim's own market can stay on next to DyMarket; they are independent, and DyMarket is the richer option.
For developers
dev.dymarket.api.DyMarketAPI reads and changes balances in major units (BigDecimal). getBalance(UUID, currency) returns the balance. deposit, withdraw and transfer run on DyMarket's IO thread and return a CompletableFuture<TransactionResult>; depositSync, withdrawSync and transferSync (also named trySyncDeposit, trySyncWithdraw and trySyncTransfer) answer on the calling thread. Each change takes a note for the transaction log. getCurrencies(), getAuctionListings(), getEstateListings() and getLeases(UUID) return snapshots from memory, safe on any thread.
Events: BalanceChangeEvent (cancellable, fired before a change on the thread that asked for it), AuctionListEvent, AuctionPurchaseEvent and AuctionCancelEvent (cancellable), AuctionExpireEvent (after the fact, on the IO thread), EstateListEvent, EstateSaleEvent and EstateLeaseStartEvent (cancellable) and EstateLeaseEndEvent (after the fact, with the reason). Add softdepend: [DyMarket] and check DyMarketAPI.isAvailable() first. Other plugins can also use DyMarket through the Vault economy API.
A synchronous call or a Vault call for an offline player whose account is not in memory waits for the IO thread to load it, at most 10 seconds. This is rare, because online players and recently used accounts (up to 10,000) stay in memory.
Data and upgrades
Everything is stored in one SQLite file, plugins/DyMarket/data.db (storage.file), with these tables: accounts, transactions, auction_listings, collect_box, estate_listings, estate_leases, players (names and language choices), notices (messages waiting for offline players) and meta (the schema version). On every start, before the file is opened, DyMarket copies it to plugins/DyMarket/backups/data-<date>.db and keeps the last seven copies. Balances are kept in memory and written in the background every storage.flush-interval-ticks; everything still waiting is written when the server stops. Disk work never runs on the main or a region thread. If the server has no SQLite driver, or the file cannot be opened, DyMarket says so in one console line and turns itself off.
The current file is schema 1; columns added since the first build (the fixed tax of auction and estate listings and leases, the lease owner's name and the eviction flag) are added in place on start. Later versions convert the file automatically, and a file written by a newer DyMarket is refused rather than changed.
Missing settings and message keys are added on start and reload without touching your edits. DyMarket checks Modrinth every six hours for a newer release and tells players with dymarket.admin.alerts; updates.check: false turns this off. Anonymous bStats statistics can be turned off with metrics.enabled: false.
Build
gradle clean build
Gradle 9.1 with Java 21 or 25. The JAR is build/libs/DyMarket-1.1.0-BETA.jar. The 99 tests use JUnit and Mockito and are not part of the JAR.
License
DyMarket Source-Available License 1.0, the same terms as DyClaim, DyRTP, DyHomes and DyDiscord: free to use and modify on any server, no paid distribution, and distributed versions must share their source. It is a custom source-available license, not an OSI-approved open-source license. See LICENSE.
Get started
- Put
DyMarket-1.1.0-BETA.jar in plugins/ (with Vault, and DyClaim 1.3.1 or later for estate) and start the server.
- Coming from EssentialsX or another Vault economy? Run
/dyma import essentials or /dyma import vault once.
- Point your webstore's delivery command at
dymarket give {player} {amount} credits {transaction_id}.
- Adjust
config.yml (currencies, auction tax, estate rent) and run /dyma reload.
Source and support
Documentation · Report an issue · License
By Claww / DyPlugin.
评论 0
登录后参与评分
还没有评论,来抢沙发吧