BetterRewards 模组
对未来更新有什么想法?在我们的网站上提交你的建议,并为你喜欢的想法投票:
一个适用于 Minecraft 服务器的完整促销代码系统。服务器管理员可以创建自定义代码,奖励玩家物品,并对数量、使用限制和过期日期拥有完全控制权。
概览
BetterRewards 为兑换促销代码提供了一个直观的内置界面。
非常适合用于:
- ? 新玩家的初始奖励
- ? 季节性活动和特殊场合的活动加成
- ? 抽奖和竞赛的成就奖励
- ? Discord 成员、支持者等的社区福利
主要功能
-
✅ 简单的图形界面 — 玩家使用 /promo 并输入代码即可
-
✅ 灵活的奖励 — 添加带有自定义数量的多种物品
-
✅ 管理员控制 — 在游戏中使用命令创建和删除代码
-
✅ 使用限制 — 设置最大兑换次数或过期日期
-
✅ 防滥用机制 — 每位玩家每个代码只能领取一次
-
✅ 统计数据 — 跟踪总兑换次数和唯一玩家数
-
✅ 离线模式支持 — 专为在离线模式服务器上运行而设计
-
✅ 在线模式支持 — 在在线模式服务器上正常运行
-
✅ 自动保存 — 兑换数据会自动持久化
-
✅ 支持多个 Minecraft 版本 — 请查看可用文件以获取支持的版本列表
安装
服务器管理员
- 下载适用于你 Minecraft 版本的
.jar 文件。
- 将其放入服务器的
mods/ 文件夹中。
- 启动服务器。
- 配置文件将自动生成。
- 可选:编辑
server_config/promocodemod-server.toml 以添加默认代码。
- 修改配置后重启服务器。
请确保下载与你的 Minecraft 和加载器版本匹配的 BetterRewards 构建版本。
玩家
BetterRewards 主要针对服务器设计。
根据服务器配置以及 Minecraft/加载器版本,客户端可能也需要安装该模组。请务必遵循服务器管理员提供的安装说明。
快速入门
创建你的第一个代码
/promocode create WELCOME minecraft:diamond 5
然后,玩家可以使用 /promo,输入 WELCOME,并获得 5 个钻石。
多种物品
/promocode create STARTER minecraft:diamond 3 minecraft:iron_sword 1 minecraft:bread 10 0 0
奖励内容:
- 3 个钻石
- 1 把铁剑
- 10 个面包
- 无限总使用次数
- 永不过期
限时活动代码
/promocode createraw HALLOWEEN:minecraft:pumpkin,20;minecraft:orange_dye,10|50|0
此代码:
- 给予 20 个南瓜
- 给予 10 个橙色染料
- 允许总共 50 次兑换
- 永不过期
删除代码
/promocode delete WELCOME
命令参考
玩家命令
| 命令 |
用途 |
/promo |
打开促销代码兑换图形界面 |
/promocode help |
显示可用命令 |
管理员命令
管理员命令需要 OP 等级 2+。
创建代码
/promocode create <CODE> <item> <count> [maxUses] [expiryEpoch]
多重奖励:
/promocode create <CODE> <item1> <count1> <item2> <count2> [item3] [count3] [maxUses] [expiryEpoch]
原始格式:
/promocode createraw <CODE:item1,count1;item2,count2|maxUses|expiryEpoch>
删除代码
/promocode delete <CODE>
帮助
/promocode help
参数
| 参数 |
值 |
描述 |
CODE |
字母、数字、_、- |
例如:WELCOME、SUMMER2026、EVENT_01 |
item |
Minecraft 物品 ID |
格式:namespace:name |
count |
1–64 |
物品的数量 |
maxUses |
0–999 |
0 表示无限 |
expiryEpoch |
Unix 时间戳 |
0 表示代码永不过期 |
示例物品 ID
minecraft:diamond
minecraft:emerald
minecraft:golden_apple
minecraft:enchanted_golden_apple
minecraft:netherite_sword
minecraft:diamond_pickaxe
minecraft:diamond_axe
minecraft:iron_sword
minecraft:bread
minecraft:coal
minecraft:iron_ingot
minecraft:oak_log
minecraft:obsidian
根据你运行的 Minecraft 版本,可能会有额外的物品可用。
过期日期
过期日期使用秒级的 Unix 时间戳。
示例:
| 日期 |
Epoch 时间戳 |
| 2025 年 1 月 1 日 |
1735689600 |
| 2025 年 7 月 1 日 |
1751328000 |
| 2026 年 1 月 1 日 |
1767225600 |
使用:
0
表示永不过期的代码。
你可以使用 Unix 时间戳转换器来生成其他日期的时间戳。
配置
服务器配置文件位于:
server_config/promocodemod-server.toml
示例:
[[promocodes]]
codes = [
"EARLY_EASTER:minecraft:diamond,5;minecraft:golden_apple,3|100|0",
"FREESTART:minecraft:iron_sword,1;minecraft:bread,10|200|0",
"DIAMONDS4ALL:minecraft:diamond,64|10|0"
]
格式
CODE:item1,count1;item2,count2|maxUses|expiryEpoch
更改配置后请重启服务器。
工作原理
- 玩家使用
/promo 打开图形界面。
- 玩家输入促销代码。
- 玩家点击 CONFIRM(确认)或按 Enter 键。
- BetterRewards 验证代码。
- 如果有效,配置的奖励将被添加到玩家的背包中。
如果背包已满,溢出的物品会掉落在玩家脚下。
无效的兑换将显示相应的错误信息,例如:
- 代码无效
- 代码已兑换
- 代码已过期
- 已达到最大使用次数
统计信息
BetterRewards 会追踪促销代码的使用情况。
图形界面(GUI)可以显示如下信息:
已兑换
25 / 100
表示在可用的 100 次兑换中,已有 25 次被使用。
玩家
10
表示共有 10 名独立玩家兑换了奖励。
防滥用保护
每位玩家对每个促销代码仅能兑换一次。
兑换信息会在服务器重启后持久保存。
这有助于防止玩家反复领取同一份奖励。
离线模式服务器
BetterRewards 支持离线模式服务器。
然而,离线模式服务器无法提供与经过身份验证的在线模式服务器相同的身份保证。服务器管理员应监控可疑活动,并在必要时禁用或删除有问题的代码。
数据存储
兑换数据会自动保存到以下位置:
world_folder/promocodes_data.json
该文件包含的信息包括:
- 玩家兑换的代码
- 每个代码的总兑换次数
- 通过命令创建的特殊代码
不建议手动编辑此文件。
如果您需要手动修改该文件,请先创建备份。
示例
欢迎奖励
/promocode create WELCOME minecraft:diamond 5 minecraft:iron_sword 1 minecraft:bread 20 0 0
奖励内容:
- 5 钻石
- 1 铁剑
- 20 面包
- 无限使用次数
- 无有效期限制
限时周年庆典活动
/promocode create ANNIVERSARY minecraft:golden_apple 3 100 1767225600
奖励 3 个金苹果,总兑换次数上限为 100 次。
复杂奖励
/promocode createraw STARTER:minecraft:diamond,10;minecraft:emerald,5;minecraft:enchanted_golden_apple,2|50|0
奖励内容:
- 10 钻石
- 5 绿宝石
- 2 附魔金苹果
- 最大兑换次数 50 次
- 无有效期限制
季节性赠送活动
/promocode create XMAS minecraft:red_concrete 20 minecraft:green_concrete 20 minecraft:gold_block 5 0 0
故障排除
“无效物品”
请检查准确的 Minecraft 物品 ID。
例如:
minecraft:acacia_log
而不是:
acacia log
物品的可用性也可能取决于您的 Minecraft 版本。
“代码已存在”
请先删除现有代码:
/promocode delete OLDCODE
然后重新创建它。
玩家无法兑换有效代码
请检查:
- 玩家是否已经兑换过该代码
- 代码是否已过期
- 是否已达到最大兑换次数
物品未出现
请检查玩家的背包。
如果背包已满,溢出的奖励会掉落在玩家脚下。
编辑配置后服务器报错
请检查:
promocodemod-server.toml
是否存在语法错误,并验证所有配置的物品 ID 是否与当前使用的 Minecraft 版本兼容。
兼容性
- Minecraft: 支持多个版本
- Modloader: 请查看具体的下载/文件以确认兼容性
- 服务器: 支持
- 客户端: 取决于所选的版本/构建
- 离线模式: 支持
- 在线模式: 支持
请务必下载与您确切的 Minecraft 版本和 Modloader 匹配的文件。
已知限制
- 标准
create 命令最多支持 3 种奖励物品
- 更复杂的奖励配置请使用
createraw
- 单个奖励条目中的物品数量限制为
1–64
- 管理员代码通过命令或配置文件创建
- 代码不区分大小写,内部存储时统一转换为大写
许可协议
未经署名不得进行再分发。
BetterRewards Mod
Have an idea for a future update? Submit your suggestion on our website and vote for your favorite ideas:
A complete promotional code system for Minecraft servers. Server administrators can create custom codes that reward players with items, with full control over quantities, usage limits, and expiration dates.
Overview
BetterRewards adds an intuitive in-game interface for redeeming promotional codes.
Perfect for:
- ? Starter rewards for new players
- ? Event bonuses for seasonal events and special occasions
- ? Achievement rewards for giveaways and contests
- ? Community perks for Discord members, supporters, and more
Key Features
-
✅ Simple GUI — Players use /promo and enter a code
-
✅ Flexible rewards — Add multiple items with custom quantities
-
✅ Admin controls — Create and delete codes in-game using commands
-
✅ Usage limits — Set maximum redemptions or expiration dates
-
✅ Anti-abuse — Each player can claim each code only once
-
✅ Statistics — Track total redemptions and unique players
-
✅ Offline-mode support — Designed to work on offline-mode servers
-
✅ Online-mode support — Works normally on online-mode servers
-
✅ Auto-save — Redemption data is automatically persisted
-
✅ Multiple Minecraft versions — Check the available files for supported versions
Installation
Server Administrators
- Download the
.jar file for your Minecraft version.
- Place it inside your server's
mods/ folder.
- Start the server.
- Configuration files will be generated automatically.
- Optionally edit
server_config/promocodemod-server.toml to add default codes.
- Restart the server after making configuration changes.
Make sure you download the correct BetterRewards build for your Minecraft and modloader version.
Players
BetterRewards is primarily designed for servers.
Depending on the server configuration and Minecraft/modloader version, the mod may also be required on the client. Always follow the installation instructions provided by the server administrator.
Quick Start
Create Your First Code
/promocode create WELCOME minecraft:diamond 5
Players can then use /promo, enter WELCOME, and receive 5 diamonds.
Multiple Items
/promocode create STARTER minecraft:diamond 3 minecraft:iron_sword 1 minecraft:bread 10 0 0
Rewards:
- 3 Diamonds
- 1 Iron Sword
- 10 Bread
- Unlimited total uses
- No expiration
Limited Event Code
/promocode createraw HALLOWEEN:minecraft:pumpkin,20;minecraft:orange_dye,10|50|0
This code:
- Gives 20 Pumpkins
- Gives 10 Orange Dye
- Allows 50 total redemptions
- Never expires
Delete a Code
/promocode delete WELCOME
Command Reference
Player Commands
| Command |
Purpose |
/promo |
Open the promo-code redemption GUI |
/promocode help |
Display available commands |
Administrator Commands
Administrator commands require OP Level 2+.
Create a Code
/promocode create <CODE> <item> <count> [maxUses] [expiryEpoch]
Multiple rewards:
/promocode create <CODE> <item1> <count1> <item2> <count2> [item3] [count3] [maxUses] [expiryEpoch]
Raw format:
/promocode createraw <CODE:item1,count1;item2,count2|maxUses|expiryEpoch>
Delete a Code
/promocode delete <CODE>
Help
/promocode help
Parameters
| Parameter |
Value |
Description |
CODE |
Letters, numbers, _, - |
Example: WELCOME, SUMMER2026, EVENT_01 |
item |
Minecraft item ID |
Format: namespace:name |
count |
1–64 |
Quantity of the item |
maxUses |
0–999 |
0 means unlimited |
expiryEpoch |
Unix timestamp |
0 means the code never expires |
Example Item IDs
minecraft:diamond
minecraft:emerald
minecraft:golden_apple
minecraft:enchanted_golden_apple
minecraft:netherite_sword
minecraft:diamond_pickaxe
minecraft:diamond_axe
minecraft:iron_sword
minecraft:bread
minecraft:coal
minecraft:iron_ingot
minecraft:oak_log
minecraft:obsidian
Additional items may be available depending on the Minecraft version you are running.
Expiration Dates
Expiration dates use Unix timestamps in seconds.
Examples:
| Date |
Epoch |
| 1 January 2025 |
1735689600 |
| 1 July 2025 |
1751328000 |
| 1 January 2026 |
1767225600 |
Use:
0
for a code that never expires.
You can use a Unix timestamp converter to generate timestamps for other dates.
Configuration
The server configuration can be found at:
server_config/promocodemod-server.toml
Example:
[[promocodes]]
codes = [
"EARLY_EASTER:minecraft:diamond,5;minecraft:golden_apple,3|100|0",
"FREESTART:minecraft:iron_sword,1;minecraft:bread,10|200|0",
"DIAMONDS4ALL:minecraft:diamond,64|10|0"
]
Format
CODE:item1,count1;item2,count2|maxUses|expiryEpoch
Restart the server after changing the configuration.
How It Works
- Player opens the GUI using
/promo.
- Player enters a promo code.
- Player clicks CONFIRM or presses Enter.
- BetterRewards validates the code.
- If valid, the configured rewards are added to the player's inventory.
If the inventory is full, overflow items are dropped at the player's feet.
Invalid redemptions display an appropriate error, such as:
- Invalid code
- Code already redeemed
- Code expired
- Maximum uses reached
Statistics
BetterRewards keeps track of promo-code usage.
The GUI can display information such as:
Redeemed
25 / 100
Meaning 25 of the available 100 redemptions have been used.
Players
10
Meaning 10 unique players have redeemed rewards.
Anti-Abuse Protection
Each player can redeem each promotional code only once.
Redemption information is persisted between server restarts.
This helps prevent players from repeatedly claiming the same reward.
Offline-Mode Servers
BetterRewards supports offline-mode servers.
However, offline-mode servers cannot provide the same identity guarantees as authenticated online-mode servers. Server administrators should monitor suspicious activity and disable or delete problematic codes if necessary.
Data Storage
Redemption data is automatically saved to:
world_folder/promocodes_data.json
The file contains information including:
- Codes redeemed by players
- Total redemptions for each code
- Custom codes created through commands
Manual editing is not recommended.
If you need to modify the file manually, create a backup first.
Examples
Welcome Bonus
/promocode create WELCOME minecraft:diamond 5 minecraft:iron_sword 1 minecraft:bread 20 0 0
Rewards:
- 5 Diamonds
- 1 Iron Sword
- 20 Bread
- Unlimited uses
- No expiration
Limited Anniversary Event
/promocode create ANNIVERSARY minecraft:golden_apple 3 100 1767225600
Rewards 3 Golden Apples with a maximum of 100 total redemptions.
Complex Reward
/promocode createraw STARTER:minecraft:diamond,10;minecraft:emerald,5;minecraft:enchanted_golden_apple,2|50|0
Rewards:
- 10 Diamonds
- 5 Emeralds
- 2 Enchanted Golden Apples
- Maximum 50 redemptions
- No expiration
Seasonal Giveaway
/promocode create XMAS minecraft:red_concrete 20 minecraft:green_concrete 20 minecraft:gold_block 5 0 0
Troubleshooting
"Invalid item"
Check the exact Minecraft item ID.
Example:
minecraft:acacia_log
not:
acacia log
Item availability can also depend on your Minecraft version.
"Code already exists"
Delete the existing code first:
/promocode delete OLDCODE
Then create it again.
Player Cannot Redeem a Valid Code
Check whether:
- The player already redeemed the code
- The code has expired
- The maximum number of redemptions has been reached
Items Do Not Appear
Check the player's inventory.
If the inventory is full, overflow rewards are dropped at the player's feet.
Server Error After Editing Configuration
Check:
promocodemod-server.toml
for syntax errors and verify that all configured item IDs are valid for the Minecraft version being used.
Compatibility
- Minecraft: Multiple versions supported
- Modloader: Check the individual download/file for compatibility
- Server: Supported
- Client: Depends on the selected version/build
- Offline Mode: Supported
- Online Mode: Supported
Always download the file that matches your exact Minecraft version and modloader.
Known Limitations
- Maximum of 3 reward items through the standard
create command
- Use
createraw for more complex reward configurations
- Item quantities are limited to
1–64 per reward entry
- Administrator codes are created through commands or configuration files
- Codes are case-insensitive and stored internally in uppercase
Licence
Redistribution without credit is not permitted.
评论 0
登录后参与评分
还没有评论,来抢沙发吧